X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/bb2c206bdd17b1f42cfdcdd62b105873a1b8f9a2..2d132ea97a8773dcb5d9f077718698996cf1b320:/src/smartxml/smartxml.test.js diff --git a/src/smartxml/smartxml.test.js b/src/smartxml/smartxml.test.js index 35cca61..6d39fbd 100644 --- a/src/smartxml/smartxml.test.js +++ b/src/smartxml/smartxml.test.js @@ -17,19 +17,35 @@ var elementNodeFromParams = function(params) { return smartxml.elementNodeFromXML('<' + params.tag + '>' + params.tag + '>'); } +var elementNodeFromXML = function(xml) { + return smartxml.elementNodeFromXML(xml); +} + describe.only('smartxml', function() { - describe('Basic use', function() { - it('exposes root element', function() { + describe('Basic Document properties', function() { + it('exposes its root element', function() { var doc = getDocumentFromXML('
'); expect(doc.root.getTagName()).to.equal('div'); }); }); + describe('Basic ElementNode properties', function() { + it('exposes node contents', function() { + var node = elementNodeFromXML('