Skip to content
Permalink
Browse files

Tests: Remove uselss "keys" helper

  • Loading branch information
markelog committed Jan 27, 2014
1 parent b26628a commit e0b606d2bdd6cddeace765a50f727a33201e621d
Showing with 1 addition and 15 deletions.
  1. +1 −15 test/data/testrunner.js
@@ -35,20 +35,6 @@ window.start = function() {
oldStart();
};

function keys(o) {
var ret, key;
if ( Object.keys ) {
ret = Object.keys( o );
} else {
ret = [];
for ( key in o ) {
ret.push( key );
}
}
ret.sort();
return ret;
}

/**
* @param {jQuery|HTMLElement|Object|Array} elems Target (or array of targets) for jQuery.data.
* @param {string} key
@@ -123,7 +109,7 @@ window.moduleTeardown = function() {
if ( QUnit.urlParams.jqdata || this.checkJqData ) {
for ( i in jQuery.cache ) {
expectedKeys = expectedDataKeys[i];
actualKeys = jQuery.cache[i] ? keys( jQuery.cache[i] ) : jQuery.cache[i];
actualKeys = jQuery.cache[i] ? Object.keys( jQuery.cache[i] ) : jQuery.cache[i];
if ( !QUnit.equiv( expectedKeys, actualKeys ) ) {
deepEqual( actualKeys, expectedKeys, "Expected keys exist in jQuery.cache" );
}

0 comments on commit e0b606d

Please sign in to comment.
You can’t perform that action at this time.