diff options
author | Chad Killingsworth <chadkillingsworth@missouristate.edu> | 2012-07-05 15:52:13 -0400 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2012-07-05 15:52:42 -0400 |
commit | de9bed319e44cb01986fb1751ceb64266bba3f95 (patch) | |
tree | 75130d3880b272f35c49c03f4ed5d48209f700ad /test/unit/selector.js | |
parent | 3dc77c4bfa08aba020cac17e87bca04fb217cedf (diff) | |
download | jquery-de9bed319e44cb01986fb1751ceb64266bba3f95.tar.gz jquery-de9bed319e44cb01986fb1751ceb64266bba3f95.zip |
Make unit tests friendly to Closure Compiler. Closes gh-845.
Conflicts:
test/unit/effects.js
test/unit/offset.js
Diffstat (limited to 'test/unit/selector.js')
-rw-r--r-- | test/unit/selector.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/unit/selector.js b/test/unit/selector.js index 7cc58e586..2c3680091 100644 --- a/test/unit/selector.js +++ b/test/unit/selector.js @@ -91,7 +91,7 @@ testIframe("selector/html5_selector", "attributes - jQuery.attr", function( jQue * @example t("Check for something", "//[a]", ["foo", "baar"]); * @param {String} a - Assertion name * @param {String} b - Sizzle selector - * @param {String} c - Array of ids to construct what is expected + * @param {Array} c - Array of ids to construct what is expected */ function t( a, b, c ) { var f = jQuery(b).get(), @@ -147,7 +147,8 @@ testIframe("selector/html5_selector", "attributes - jQuery.attr", function( jQue t( "Attribute Exists", "[truespeed]", ["marquee1"]); // Enumerated attributes (these are not boolean content attributes) - jQuery.each([ "draggable", "contenteditable", "aria-disabled" ], function( i, val ) { + jQuery.expandedEach = jQuery.each; + jQuery.expandedEach([ "draggable", "contenteditable", "aria-disabled" ], function( i, val ) { t( "Enumerated attribute", "[" + val + "]", ["div1"]); }); t( "Enumerated attribute", "[spellcheck]", ["span1"]); @@ -157,7 +158,7 @@ testIframe("selector/html5_selector", "attributes - jQuery.attr", function( jQue }); testIframe("selector/sizzle_cache", "Sizzle cache collides with multiple Sizzles on a page", function( jQuery, window, document ) { - var $cached = window.$cached; + var $cached = window["$cached"]; expect(3); deepEqual( $cached('.test a').get(), [ document.getElementById('collision') ], "Select collision anchor with first sizzle" ); |