diff options
author | Dave Methvin <dave.methvin@gmail.com> | 2014-03-03 22:18:50 -0500 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2014-03-04 21:50:39 -0500 |
commit | c93b174b920aa31b291d40d919d50f9a11fa41d0 (patch) | |
tree | 719a4b8efc168885dcff21b58f65352ee991536a /test/unit/core.js | |
parent | a9fa2ec76361abf4b2623879cf7932c488293f60 (diff) | |
download | jquery-c93b174b920aa31b291d40d919d50f9a11fa41d0.tar.gz jquery-c93b174b920aa31b291d40d919d50f9a11fa41d0.zip |
Core: Arrays like [42] should fail .isNumeric()
Fixes #14179
(cherry picked from commit 10efa1f5b44046aab6bcc8423322a41923faa290)
Diffstat (limited to 'test/unit/core.js')
-rw-r--r-- | test/unit/core.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/unit/core.js b/test/unit/core.js index a5b77e54e..02ad0f221 100644 --- a/test/unit/core.js +++ b/test/unit/core.js @@ -462,7 +462,7 @@ test("isFunction", function() { }); test( "isNumeric", function() { - expect( 36 ); + expect( 38 ); var t = jQuery.isNumeric, Traditionalists = /** @constructor */ function(n) { @@ -510,6 +510,8 @@ test( "isNumeric", function() { equal( t(Number.NEGATIVE_INFINITY), false, "Negative Infinity"); equal( t(rong), false, "Custom .toString returning non-number"); equal( t({}), false, "Empty object"); + equal( t( [] ), false, "Empty array" ); + equal( t( [ 42 ] ), false, "Array with one number" ); equal( t(function(){} ), false, "Instance of a function"); equal( t( new Date() ), false, "Instance of a Date"); equal( t(function(){} ), false, "Instance of a function"); |