We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5234c67 commit e4f8bd4Copy full SHA for e4f8bd4
1 file changed
test/xml.test.js
@@ -148,3 +148,8 @@ test('xml declaration options', t => {
148
t.is(xml([{a: 'test'}], {declaration: true, indent: '\n'}), '<?xml version="1.0" encoding="UTF-8"?>\n<a>test</a>');
149
t.is(xml([{a: 'test'}], {}), '<a>test</a>');
150
});
151
+
152
+test('escape option', t => {
153
+ t.is(xml([ { x: '<a>test</a>' } ], { escape: false }), '<x><a>test</a></x>');
154
+ t.is(xml([ { x: [ { _attr: { a: 'x' } }, '<a>test</a>' ] } ], { escape: false }), '<x a="x"><a>test</a></x>');
155
+});
0 commit comments