fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
smartxml: fix tests - extensions needs to be registered before querying nodes
[fnpeditor.git]
/
src
/
smartxml
/
smartxml.test.js
diff --git
a/src/smartxml/smartxml.test.js
b/src/smartxml/smartxml.test.js
index
93c401b
..
1be4cc1
100644
(file)
--- 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() {
});
it('keeps parent-describing nodes in place', function() {
- var section = elementNodeFromXML('<section>Alice<x></x><div>a cat</div></section>'),
- aliceText = section.contents()[0],
- x = section.contents()[1],
- lastDiv = section.contents()[2];
+ var section = elementNodeFromXML('<section>Alice<x></x><div>a cat</div></section>');
section.document.registerExtension({documentNode: {methods: {
object: {
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,
section.document.wrapNodes({
node1: aliceText,
node2: lastDiv,