fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
wlxml: metadata - additional iterator, filtering
[fnpeditor.git]
/
src
/
wlxml
/
extensions
/
list
/
list.test.js
diff --git
a/src/wlxml/extensions/list/list.test.js
b/src/wlxml/extensions/list/list.test.js
index
faa85da
..
87c47c7
100644
(file)
--- a/
src/wlxml/extensions/list/list.test.js
+++ b/
src/wlxml/extensions/list/list.test.js
@@
-2,6
+2,9
@@
define(function(require) {
'use strict';
'use strict';
+/* jshint multistr:true */
+/* globals describe, it */
+
var chai = require('libs/chai'),
wlxml = require('wlxml/wlxml'),
expect = chai.expect,
var chai = require('libs/chai'),
wlxml = require('wlxml/wlxml'),
expect = chai.expect,
@@
-16,6
+19,7
@@
var getDocumentFromXML = function(xml, options) {
};
var removeEmptyTextNodes = function(xml) {
};
var removeEmptyTextNodes = function(xml) {
+ /* globals Node */
xml = $($.trim(xml));
xml.find(':not(iframe)')
.addBack()
xml = $($.trim(xml));
xml.find(':not(iframe)')
.addBack()
@@
-144,8
+148,7
@@
describe('Lists extension', function() {
</section>')),
list = doc.root.contents()[0],
item1 = list.contents()[0],
</section>')),
list = doc.root.contents()[0],
item1 = list.contents()[0],
- item2 = list.contents()[1],
- item3 = list.contents()[2];
+ item2 = list.contents()[1];
doc.extractItems({item1: item1, item2: item2});
doc.extractItems({item1: item1, item2: item2});
@@
-171,7
+174,6
@@
describe('Lists extension', function() {
</div>\
</section>')),
list = doc.root.contents()[0],
</div>\
</section>')),
list = doc.root.contents()[0],
- item1 = list.contents()[0],
item2 = list.contents()[1],
item3 = list.contents()[2];
item2 = list.contents()[1],
item3 = list.contents()[2];
@@
-233,9
+235,8
@@
describe('Lists extension', function() {
doc.extractItems({item1: nestedListItem, item2: nestedListItem}); //@@ name!
doc.extractItems({item1: nestedListItem, item2: nestedListItem}); //@@ name!
- var section = doc.root,
- list = section.contents()[0],
- item1 = list.contents()[0],
+ list = doc.root.contents()[0];
+ var item1 = list.contents()[0],
item2 = list.contents()[1], //
item3 = list.contents()[2],
item4 = list.contents()[3], //
item2 = list.contents()[1], //
item3 = list.contents()[2],
item4 = list.contents()[3], //
@@
-281,10
+282,8
@@
describe('Lists extension', function() {
nestedListItem2 = nestedList.contents()[2];
doc.extractItems({item1: nestedListItem1, item2: nestedListItem2});
nestedListItem2 = nestedList.contents()[2];
doc.extractItems({item1: nestedListItem1, item2: nestedListItem2});
-
- var section = doc.root,
- list = section.contents()[0],
- item1 = list.contents()[0],
+ list = doc.root.contents()[0];
+ var item1 = list.contents()[0],
item2 = list.contents()[1],
item3 = list.contents()[2],
item4 = list.contents()[3],
item2 = list.contents()[1],
item3 = list.contents()[2],
item4 = list.contents()[3],
@@
-323,9
+322,8
@@
describe('Lists extension', function() {
doc.extractItems({item1: nestedListItem1, item2: nestedListItem2});
doc.extractItems({item1: nestedListItem1, item2: nestedListItem2});
- var section = doc.root,
- list = section.contents()[0],
- item1 = list.contents()[0],
+ list = doc.root.contents()[0];
+ var item1 = list.contents()[0],
item2 = list.contents()[1],
item3 = list.contents()[2],
item4 = list.contents()[3],
item2 = list.contents()[1],
item3 = list.contents()[2],
item4 = list.contents()[3],
@@
-364,9
+362,8
@@
describe('Lists extension', function() {
doc.extractItems({item1: nestedListItem1, item2: nestedListItem2});
doc.extractItems({item1: nestedListItem1, item2: nestedListItem2});
- var section = doc.root,
- list = section.contents()[0],
- item1 = list.contents()[0],
+ list = doc.root.contents()[0];
+ var item1 = list.contents()[0],
item2 = list.contents()[1],
item3 = list.contents()[2],
item4 = list.contents()[3];
item2 = list.contents()[1],
item3 = list.contents()[2],
item4 = list.contents()[3];