'),
appended = c.doc().append({text: 'Alice'}),
children = c.doc().children();
- expect(children.length).to.equal(1);
- expect(children[0].sameNode(appended)).to.be.true;
- expect(children[0].getText()).to.equal('Alice');
+ expect(children.length).to.equal(2);
+ expect(children[1].sameNode(appended)).to.be.true;
+ expect(children[1].getText()).to.equal('Alice');
});
it('can put new NodeElement at the beginning', function() {
@@ -1350,8 +1362,9 @@ describe('Canvas', function() {
it('keeps white space between XML nodes - inline case', function() {
var xmlIn = '',
- c = canvas.fromXML(xmlIn),
- xmlOut = c.toXML();
+ c = canvas.fromXML(xmlIn);
+
+ var xmlOut = c.toXML();
var partsIn = xmlIn.split('\n\n\n'),
partsOut = xmlOut.split('\n\n\n');