X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/8254ff82e19d41b2a66a4549165b924084ed6a52..d67ed5177c7b434beb026aab16a91333e295a914:/modules/documentCanvas/canvas/canvas.test3.js diff --git a/modules/documentCanvas/canvas/canvas.test3.js b/modules/documentCanvas/canvas/canvas.test3.js index 77b3b19..e122a1a 100644 --- a/modules/documentCanvas/canvas/canvas.test3.js +++ b/modules/documentCanvas/canvas/canvas.test3.js @@ -11,6 +11,30 @@ var expect = chai.expect; describe('Canvas', function() { + describe('Internal HTML representation of a sample document', function() { + it('works', function() { + var c = canvas.fromXML('\ +
\ + This is some text without its own wrapping tag.\ +
\ + This is a paragraph.\ +
\ +
\ + This is text in a div with some inline text.\ +
\ + This is some text without its own wrapping tag.\ +
\ + '); + var expected = '
' + + 'This is some text without its own wrapping tag.' + + '
This is a paragraph.
' + + '
This is text in a div
with some inline text
.
' + + 'This is some text without its own wrapping tag.' + + '
'; + expect(c.doc().dom()[0].isEqualNode($(expected)[0])).to.be.true; + }); + }); + describe('Internal HTML representation of a DocumentNodeElement', function() { it('is always a div tag', function() { ['section', 'header', 'span', 'aside', 'figure'].forEach(function(tagName) {