Fix
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 16 Jul 2013 08:51:07 +0000 (10:51 +0200)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 16 Jul 2013 08:51:07 +0000 (10:51 +0200)
modules/documentCanvas/canvas/canvas.test3.js
modules/documentCanvas/canvas/documentElement.js

index 0b71ee0..43c9083 100644 (file)
@@ -304,7 +304,7 @@ describe('Canvas', function() {
                         children = c.doc().children();
 
                     expect(children.length).to.equal(1);
                         children = c.doc().children();
 
                     expect(children.length).to.equal(1);
-                    expect(children[0].sameNode(appended));
+                    expect(children[0].sameNode(appended)).to.be.true;
                 });
 
                 it('can put new TextElement at the end', function() {
                 });
 
                 it('can put new TextElement at the end', function() {
@@ -313,7 +313,7 @@ describe('Canvas', function() {
                         children = c.doc().children();
 
                     expect(children.length).to.equal(1);
                         children = c.doc().children();
 
                     expect(children.length).to.equal(1);
-                    expect(children[0].sameNode(appended));
+                    expect(children[0].sameNode(appended)).to.be.true;
                     expect(children[0].getText()).to.equal('Alice');
                 });
 
                     expect(children[0].getText()).to.equal('Alice');
                 });
 
@@ -323,7 +323,7 @@ describe('Canvas', function() {
                         added = div.after({tag: 'header', klass: 'some.class'}),
                         children = c.doc().children();
                     expect(children.length).to.equal(2);
                         added = div.after({tag: 'header', klass: 'some.class'}),
                         children = c.doc().children();
                     expect(children.length).to.equal(2);
-                    expect(children[1].sameNode(added));
+                    expect(children[1].sameNode(added)).to.be.true;
                 });
 
                 it('can put new Nodeelement before another element', function() {
                 });
 
                 it('can put new Nodeelement before another element', function() {
@@ -332,7 +332,7 @@ describe('Canvas', function() {
                         added = div.before({tag: 'header', klass: 'some.class'}),
                         children = c.doc().children();
                     expect(children.length).to.equal(2);
                         added = div.before({tag: 'header', klass: 'some.class'}),
                         children = c.doc().children();
                     expect(children.length).to.equal(2);
-                    expect(children[0].sameNode(added));
+                    expect(children[0].sameNode(added)).to.be.true;
                 });
 
                 it('can put new DocumentNodeElement after DocumentTextElement', function() {
                 });
 
                 it('can put new DocumentNodeElement after DocumentTextElement', function() {
index aa3fd9b..0309136 100644 (file)
@@ -143,14 +143,14 @@ DocumentNodeElement.prototype = new DocumentElement();
 
 $.extend(DocumentNodeElement.prototype, {
     append: function(params) {
 
 $.extend(DocumentNodeElement.prototype, {
     append: function(params) {
-        manipulate(this, params, 'append');
+        return manipulate(this, params, 'append');
     },
     before: function(params) {
     },
     before: function(params) {
-        manipulate(this, params, 'before');
+        return manipulate(this, params, 'before');
 
     },
     after: function(params) {
 
     },
     after: function(params) {
-        manipulate(this, params, 'after');
+        return manipulate(this, params, 'after');
     },
     children: function() {
         var toret = [];
     },
     children: function() {
         var toret = [];