From e0b606d2bdd6cddeace765a50f727a33201e621d Mon Sep 17 00:00:00 2001 From: Oleg Gaidarenko Date: Mon, 27 Jan 2014 23:27:32 +0400 Subject: [PATCH] Tests: Remove uselss "keys" helper --- test/data/testrunner.js | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/test/data/testrunner.js b/test/data/testrunner.js index 72ec66129..474073845 100644 --- a/test/data/testrunner.js +++ b/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" ); } -- 2.39.5