diff options
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib/bootstrap.js | 6 | ||||
-rw-r--r-- | tests/lib/qunit-assert-domequal.js | 8 |
2 files changed, 10 insertions, 4 deletions
diff --git a/tests/lib/bootstrap.js b/tests/lib/bootstrap.js index e3d344cec..ffb273837 100644 --- a/tests/lib/bootstrap.js +++ b/tests/lib/bootstrap.js @@ -181,9 +181,9 @@ function migrateUrl() { } } - // Load the jQuery 1.7 fixes, if necessary - if ( parseFloat( parseUrl().jquery ) === 1.7 ) { - modules.push( "ui/jquery-1-7" ); + // Load the jQuery fixes, if necessary + if ( parseFloat( parseUrl().jquery ) < 3 ) { + modules.unshift( "ui/jquery-1-7" ); } requireTests( modules, noBackCompat ); diff --git a/tests/lib/qunit-assert-domequal.js b/tests/lib/qunit-assert-domequal.js index b22bd90b9..35695c4f1 100644 --- a/tests/lib/qunit-assert-domequal.js +++ b/tests/lib/qunit-assert-domequal.js @@ -59,6 +59,12 @@ domEqual.attributes = [ "title" ]; +function camelCase( string ) { + return string.replace( /-([\da-z])/gi, function( all, letter ) { + return letter.toUpperCase(); + } ); +} + function getElementStyles( elem ) { var styles = {}; var style = elem.ownerDocument.defaultView ? @@ -71,7 +77,7 @@ function getElementStyles( elem ) { while ( len-- ) { key = style[ len ]; if ( typeof style[ key ] === "string" ) { - styles[ $.camelCase( key ) ] = style[ key ]; + styles[ camelCase( key ) ] = style[ key ]; } } |