From b3493517adea9831d8bed8bbd33422d6d8527796 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Mon, 23 Jun 2014 15:12:35 +0200 Subject: [PATCH 1/1] smartxml: fix tests - extensions needs to be registered before querying nodes --- src/smartxml/smartxml.test.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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, -- 2.20.1