Tests: Minor updates for QUnit 1.16 compatibility

More to come later.
This commit is contained in:
Richard Gibson
2014-12-05 12:28:40 -05:00
parent b6e31a8833
commit f6f8848fbe
5 changed files with 25 additions and 24 deletions

View File

@@ -43,14 +43,13 @@ function keys( o ) {
* @param {jQuery|HTMLElement|Object|Array} elems Target (or array of targets) for jQuery.data.
* @param {string} key
*/
QUnit.expectJqData = function( elems, key ) {
var i, elem, expando,
currentEnv = "current_testEnvironment";
QUnit.expectJqData = function( env, elems, key ) {
var i, elem, expando;
// As of jQuery 2.0, there will be no "cache"-data is
// stored and managed completely below the API surface
if ( jQuery.cache ) {
QUnit[ currentEnv ].checkJqData = true;
env.checkJqData = true;
if ( elems.jquery && elems.toArray ) {
elems = elems.toArray();