expect(event.meta.node.sameNode(a));
});
- it('doesn\'t emit nodeDetached event for already out of document moved to out of document node: ' + insertionMethod, function() {
+ it('doesn\'t emit nodeDetached event for already out of document node moved to out of document node' + insertionMethod, function() {
var doc = getDocumentFromXML('<div><a></a></div>'),
- a = doc.root.contents()[0],
spy = sinon.spy();
doc.on('change', spy);
var newNode = doc.createDocumentNode({tagName: 'b'});
- var newNodeInner = newNode.append({tagName:'c'});
+ newNode.append({tagName:'c'});
expect(spy.callCount).to.equal(0);
});
});
describe('Extension API', function() {
- var doc, extension, elementNode, textNode, testClassNode;
+ var doc, extension, elementNode, textNode;
beforeEach(function() {
doc = getDocumentFromXML('<section>Alice<div class="test_class"></div></section>');
</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});
</div>\
</section>')),
list = doc.root.contents()[0],
- item1 = list.contents()[0],
item2 = list.contents()[1],
item3 = list.contents()[2];