X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/cee08f0b14be951a31544ae708b2a92f6255e61a..1f6c4e3196778b8d0e91988c8c56966f9bb2ef8f:/src/wlxml/extensions/list/list.test.js?ds=inline diff --git a/src/wlxml/extensions/list/list.test.js b/src/wlxml/extensions/list/list.test.js index faa85da..fd6089e 100644 --- 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'; +/* jshint multistr:true */ +/* globals describe, it */ + 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) { + /* globals Node */ xml = $($.trim(xml)); xml.find(':not(iframe)') .addBack() @@ -233,9 +237,8 @@ describe('Lists extension', function() { 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], // @@ -281,10 +284,8 @@ describe('Lists extension', function() { 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], @@ -323,9 +324,8 @@ describe('Lists extension', function() { 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], @@ -364,9 +364,8 @@ describe('Lists extension', function() { 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];