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

Commit

Permalink
asser that template.clear "unsets" .model
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelw committed Feb 5, 2014
1 parent cc00394 commit e66083f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -1201,9 +1201,10 @@ suite('Template Instantiation', function() {
assert.strictEqual('1', div.childNodes[2].textContent);
assert.strictEqual('2', div.childNodes[3].textContent);

// clear() synchronously removes instances
// clear() synchronously removes instances and clears the model.
div.firstChild.clear();
assert.strictEqual(1, div.childNodes.length);
assert.strictEqual(undefined, template.model);

// test that template still works if new model assigned
template.model = [3, 4];
Expand Down

0 comments on commit e66083f

Please sign in to comment.