X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/34ca0e947bbf0afdc520c025daabbe1221d69628..ecf245195f18fa05ff987a10f8e26d53ba8f36ed:/modules/documentCanvas/canvas/canvas.test3.js diff --git a/modules/documentCanvas/canvas/canvas.test3.js b/modules/documentCanvas/canvas/canvas.test3.js index bd47bf7..08e6e0f 100644 --- a/modules/documentCanvas/canvas/canvas.test3.js +++ b/modules/documentCanvas/canvas/canvas.test3.js @@ -502,13 +502,13 @@ describe('Canvas', function() { describe('unwrapping', function() { it('unwraps DocumentTextElement from its parent DocumentNodeElement if it\'s its only child', function() { - var c = canvas.fromXML('
Alice has a cat
'), + var c = canvas.fromXML('
Alice has a cat
'), section = c.doc(), - text = section.children()[0].children()[0]; + text = section.children()[1].children()[0]; text.unwrap(); - expect(section.children().length).to.equal(1); + expect(section.children().length).to.equal(1, 'section has one child'); expect(section.children()[0].getText()).to.equal('Alice has a cat'); }) });