Permalink
Browse files

Fix spec failure that occurred only when *all* specs are run (not whe…

…n just running template specs).

Really, we should stop using `testNode` as a global variable, as it introduces order dependencies between specs.
  • Loading branch information...
1 parent 98ffbd0 commit c666cb5fd82aaafcc6f63719b951b0cb4caa2985 @SteveSanderson SteveSanderson committed May 18, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 spec/templatingBehaviors.js
@@ -96,11 +96,11 @@ dummyTemplateEngine.prototype = new ko.templateEngine();
describe('Templating', {
before_each: function () {
ko.setTemplateEngine(new ko.nativeTemplateEngine());
- var existingNode = document.getElementById("templatingTarget");
+ var existingNode = document.getElementById("testNode");
if (existingNode != null)
existingNode.parentNode.removeChild(existingNode);
testNode = document.createElement("div");
- testNode.id = "templatingTarget";
+ testNode.id = "testNode";
document.body.appendChild(testNode);
},

0 comments on commit c666cb5

Please sign in to comment.