X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/f63769e206281f306f6c2cb937358837da450185..bb204203f5f64dd13b256263fd398e1463d4eaf9:/src/smartxml/smartxml.test.js?ds=inline diff --git a/src/smartxml/smartxml.test.js b/src/smartxml/smartxml.test.js index 5d1ca3e..a994f05 100644 --- a/src/smartxml/smartxml.test.js +++ b/src/smartxml/smartxml.test.js @@ -219,6 +219,21 @@ describe('smartxml', function() { expect(event.meta.oldVal).to.equal('value1'); }); }); + + describe('Searching for the last child text node', function() { + [ + '
xxx
last
', + '
last
', + '
xxx
last
' + ].forEach(function(xml, i) { + var example = 'example ' + i; + it('returns last child text node ' + example + ')', function() { + var doc = getDocumentFromXML(xml), + lastTextNode = doc.root.getLastTextNode(); + expect(lastTextNode.getText()).to.equal('last', example); + }); + }); + }); }); describe('Basic TextNode properties', function() {