mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Core: Arrays like [42] should fail .isNumeric()
Fixes #14179
(cherry picked from commit 10efa1f5b4)
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user