Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix failing test in IE8-. See #61.

  • Loading branch information...
commit 7dcf0a56e9a0576f64d487890fd58afd462a3476 1 parent 609d8d5
@petermichaux authored
Showing with 16 additions and 1 deletion.
  1. +16 −1 tst/ElementView.subclass-suite.js
View
17 tst/ElementView.subclass-suite.js
@@ -91,7 +91,22 @@
alphaView.removeChild(betaView);
assert.same(0, alphaView.childNodes.length);
assert.same(betaView.parentNode, null);
- assert.same(betaView.build().parentNode, null);
+ // It would be best to check that betaView.build().parentNode is null
+ // however IE8- does not set the parentNode to null after removing
+ // an element from its parent.
+ //
+ // http://cjwainwright.co.uk/webdev/ie8removechild/
+ //
+ // One day when IE8- do not matter, change the following if-else to just
+ //
+ // assert.same(betaView.build().parentNode, null);
+ //
+ if (betaView.build().parentNode === null) {
+ assert.same(betaView.build().parentNode, null);
+ }
+ else {
+ refute.same(betaView.build().parentNode, alphaView.build());
+ }
},
"test subclass UI actions sugar": function() {
Please sign in to comment.
Something went wrong with that request. Please try again.