Skip to content

Commit

Permalink
Fix scoping in sizzle test
Browse files Browse the repository at this point in the history
See http://ada.adrianlang.de/with-trouble for an explanation of the issue.
  • Loading branch information
adrianheine authored and domenic committed May 11, 2013
1 parent 8b28f96 commit ce5bf8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/sizzle/index.js
Expand Up @@ -79,7 +79,7 @@ function test(fn) {
};
}

exports['element'] = test(function (window) { with (window) {
exports['element'] = test(function (window) { with (window) { (function () {
expect( 37 );

equal( Sizzle("").length, 0, "Empty selector returns an empty array" );
Expand Down Expand Up @@ -159,7 +159,7 @@ exports['element'] = test(function (window) { with (window) {
// Real use case would be using .watch in browsers with window.watch (see Issue #157)
q("qunit-fixture")[0].appendChild( document.createElement("toString") ).id = "toString";
t( "Element name matches Object.prototype property", "toString#toString", ["toString"] );
}});
}())}});

exports['broken'] = test(function (window) { with (window) {
expect( 22 );
Expand Down

0 comments on commit ce5bf8d

Please sign in to comment.