Commit e0b606d2 authored by Oleg Gaidarenko's avatar Oleg Gaidarenko

Tests: Remove uselss "keys" helper

parent b26628a2
...@@ -35,20 +35,6 @@ window.start = function() { ...@@ -35,20 +35,6 @@ window.start = function() {
oldStart(); 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 {jQuery|HTMLElement|Object|Array} elems Target (or array of targets) for jQuery.data.
* @param {string} key * @param {string} key
...@@ -123,7 +109,7 @@ window.moduleTeardown = function() { ...@@ -123,7 +109,7 @@ window.moduleTeardown = function() {
if ( QUnit.urlParams.jqdata || this.checkJqData ) { if ( QUnit.urlParams.jqdata || this.checkJqData ) {
for ( i in jQuery.cache ) { for ( i in jQuery.cache ) {
expectedKeys = expectedDataKeys[i]; 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 ) ) { if ( !QUnit.equiv( expectedKeys, actualKeys ) ) {
deepEqual( actualKeys, expectedKeys, "Expected keys exist in jQuery.cache" ); deepEqual( actualKeys, expectedKeys, "Expected keys exist in jQuery.cache" );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment