]> source.dussan.org Git - jquery.git/commitdiff
Tests: Remove uselss "keys" helper
authorOleg Gaidarenko <markelog@gmail.com>
Mon, 27 Jan 2014 19:27:32 +0000 (23:27 +0400)
committerOleg Gaidarenko <markelog@gmail.com>
Tue, 15 Apr 2014 13:45:58 +0000 (17:45 +0400)
test/data/testrunner.js

index 72ec66129c83050bcb93e61e2a298ce4b1f03169..474073845fe8a228d382942478a45577efaa3b72 100644 (file)
@@ -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" );
                        }