Skip to content

Commit

Permalink
Add test for issue #90
Browse files Browse the repository at this point in the history
  • Loading branch information
oozcitak committed Jul 9, 2021
1 parent 5222fe4 commit fcc16d9
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/issues/issue-090.test.ts
Original file line number Diff line number Diff line change
@@ -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(`
<monologue>
Talk to me Goose!
<cut>dog tag shot</cut>
Talk to me...
</monologue>
`);
})

})

0 comments on commit fcc16d9

Please sign in to comment.