X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/471df249233a0064cdd3c4efe890536d8b304037..232e5bd6f1b93f27e227a291b7913867e7d76be7:/src/smartxml/smartxml.test.js 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() {