Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Add asserts to test
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelw committed Sep 9, 2013
1 parent 7c05550 commit 88bdc50
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -1363,11 +1363,19 @@ suite('Template Instantiation', function() {
}
];

recursivelySetTemplateModel(div, m);

var ul = div.firstChild;
var t = ul.firstChild;
t.model = m;
Platform.performMicrotaskCheckpoint();
assert.strictEqual(ul.childNodes.length, 2);
var ul2 = ul.childNodes[1].childNodes[1];
assert.strictEqual(ul2.childNodes.length, 2);
var ul3 = ul2.childNodes[1].childNodes[1]
assert.strictEqual(ul3.childNodes.length, 1);

m.splice(0, 1);
Platform.performMicrotaskCheckpoint();
assert.strictEqual(ul.childNodes.length, 1);
});

test('DeepNested', function() {
Expand Down

0 comments on commit 88bdc50

Please sign in to comment.