diff --git a/src/index.test.js b/src/index.test.js index 195ded1..82c5410 100644 --- a/src/index.test.js +++ b/src/index.test.js @@ -262,6 +262,25 @@ describe('#jsx-pdf', () => { }, }); }); + + it('should support nested text elements in the stack', () => { + expect( + toPDFMake( + + + + first + second + + + , + ), + ).toEqual({ + content: { + stack: [{ text: [{ text: 'first' }, { text: 'second' }] }], + }, + }); + }); }); it('should ignore falsy values', () => {