From: Aleksander Ɓukasz Date: Mon, 23 Jun 2014 13:12:35 +0000 (+0200) Subject: smartxml: fix tests - extensions needs to be registered before querying nodes X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/b3493517adea9831d8bed8bbd33422d6d8527796?hp=-c smartxml: fix tests - extensions needs to be registered before querying nodes --- b3493517adea9831d8bed8bbd33422d6d8527796 diff --git a/src/smartxml/smartxml.test.js b/src/smartxml/smartxml.test.js index 93c401b..1be4cc1 100644 --- a/src/smartxml/smartxml.test.js +++ b/src/smartxml/smartxml.test.js @@ -767,10 +767,7 @@ describe('smartxml', function() { }); it('keeps parent-describing nodes in place', function() { - var section = elementNodeFromXML('
Alice
a cat
'), - aliceText = section.contents()[0], - x = section.contents()[1], - lastDiv = section.contents()[2]; + var section = elementNodeFromXML('
Alice
a cat
'); section.document.registerExtension({documentNode: {methods: { object: { @@ -780,6 +777,10 @@ describe('smartxml', function() { } }}}); + var aliceText = section.contents()[0], + x = section.contents()[1], + lastDiv = section.contents()[2]; + section.document.wrapNodes({ node1: aliceText, node2: lastDiv,