X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/ad1f72d773192f688ed9e55dbf6780756e379d73..2981e2d70a5e01cea54e6204e5690285a28e2d91:/src/wlxml/extensions/list/list.test.js?ds=sidebyside
diff --git a/src/wlxml/extensions/list/list.test.js b/src/wlxml/extensions/list/list.test.js
index 87c47c7..396600b 100644
--- a/src/wlxml/extensions/list/list.test.js
+++ b/src/wlxml/extensions/list/list.test.js
@@ -60,6 +60,15 @@ describe('Lists extension', function() {
expect(child3.contents()[0].getText()).to.equal('cat');
});
+ it('Handles text nodes on the boundries', function() {
+ var doc = getDocumentFromXML(''),
+ textNode1 = doc.root.contents()[0],
+ textNode2 = doc.root.contents()[2];
+ doc.createList({node1: textNode1, node2: textNode2});
+ expect(doc.root.contents().length).to.equal(1);
+ expect(doc.root.contents()[0].is('list')).to.equal(true);
+ });
+
it('allows creating nested list from existing sibling list items', function() {
var doc = getDocumentFromXML('\