Skip to content

Commit

Permalink
fixed addChild tests
Browse files Browse the repository at this point in the history
  • Loading branch information
erikyuzwa committed Sep 2, 2015
1 parent 19cad93 commit 0527665
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions test/unit/component.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,14 @@ test('should add a child component to an index', function(){
ok(comp.children().length === 3);
ok(comp.children()[2] === child1);

var child2 = comp.addChild('component', {}, null);
var child2 = comp.addChild('component', {}, undefined);
ok(comp.children().length === 4);
ok(comp.children()[3] === child2);

var child3 = comp.addChild('component', {}, undefined);
var child3 = comp.addChild('component', {}, -1);
ok(comp.children().length === 5);
ok(comp.children()[4] === child3);

var child4 = comp.addChild('component', {}, -1);
ok(comp.children().length === 6);
ok(comp.children()[4] === child4);
ok(comp.children()[5] === child3);
ok(comp.children()[3] === child3);
ok(comp.children()[4] === child2);

});

Expand Down

0 comments on commit 0527665

Please sign in to comment.