import { expect } from 'chai'; import '../../src/index'; import { DOMParserImpl } from '../../src/parser/dom-parser'; describe('Serializer tests', () => { it('text node containing "]]>"', () => { const doc = new DOMParser().parseFromString('', 'text/xml'); doc.documentElement.appendChild(doc.createTextNode('hello ]]> there')); expect(doc.documentElement.firstChild!.toString()).to.eq( 'hello ]]> there', doc.documentElement.firstChild!.toString(), ); }); it('', 'text/html', ); //console.log(doc.documentElement.firstChild.toString(true)) expect(doc.documentElement.firstChild!.toString()).to.eq(''); }); });