From fcc16d95c89b618c1de10cc7db0a9e5ab946e490 Mon Sep 17 00:00:00 2001 From: oozcitak Date: Fri, 9 Jul 2021 18:05:09 +0300 Subject: [PATCH] Add test for issue #90 --- test/issues/issue-090.test.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 test/issues/issue-090.test.ts diff --git a/test/issues/issue-090.test.ts b/test/issues/issue-090.test.ts new file mode 100644 index 0000000..853a8b8 --- /dev/null +++ b/test/issues/issue-090.test.ts @@ -0,0 +1,25 @@ +import $$ from "../TestHelpers"; + +describe("Replicate issue", () => { + // https://github.com/oozcitak/xmlbuilder2/issues/90 + test(`#90 - The Mixed Content example for Text Object Conversion does not work.`, () => { + const obj2 = { + monologue: { + '#': [ + 'Talk to me Goose!', + { 'cut': 'dog tag shot' }, + 'Talk to me...' + ] + } + }; + const doc = $$.create().ele(obj2); + expect(doc.end({ prettyPrint: true})).toBe(` + + Talk to me Goose! + dog tag shot + Talk to me... + + `); + }) + +})