Skip to content

Commit 589b990

Browse files
committed
fixes the test after nodeList fix
1 parent 4404b22 commit 589b990

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/component-in-stache-test.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,22 @@ QUnit.test("wrapped in a conditional", function (assert) {
6666
assert.equal(fragment.textContent, "Hello world", "fragment has correct text content after updating componentVM");
6767

6868
// Listen for when the viewmodel is bound; need to make sure it isn’t at the end
69+
var waitingCount = 0;
70+
function finishOn2(){
71+
waitingCount++;
72+
if(waitingCount === 2) {
73+
done();
74+
}
75+
}
6976
canReflect.onInstanceBoundChange(ComponentConstructor.ViewModel, function(instance, isBound) {
7077
assert.equal(isBound, false, "view model is no longer bound");
71-
done();
78+
finishOn2();
7279
});
7380

7481
// Hide the component
7582
templateVM.set("showComponent", false);
7683
assert.equal(fragment.textContent, "", "fragment ends without content");
84+
finishOn2();
7785
});
7886

7987
QUnit.test("Component can be removed from the page", 3, function(){

0 commit comments

Comments
 (0)