X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/14c5677515f8d609f9a57e6e08f15af1e32a0207..66cc0acfd75edaf656c8ce482421674a8d0fa126:/src/smartxml/smartxml.test.js?ds=sidebyside diff --git a/src/smartxml/smartxml.test.js b/src/smartxml/smartxml.test.js index bd1dfe4..6d6cbbf 100644 --- a/src/smartxml/smartxml.test.js +++ b/src/smartxml/smartxml.test.js @@ -85,6 +85,20 @@ describe('smartxml', function() { }); + describe('Serializing document to WLXML', function() { + it('keeps document intact when no changes have been made', function() { + var xmlIn = '
Alice
has
a cat!
', + doc = getDocumentFromXML(xmlIn), + xmlOut = doc.toXML(); + + var parser = new DOMParser(), + input = parser.parseFromString(xmlIn, 'application/xml').childNodes[0], + output = parser.parseFromString(xmlOut, 'application/xml').childNodes[0]; + + expect(input.isEqualNode(output)).to.be.true; + }); + }); + }); }); \ No newline at end of file