aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/core.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/core.js')
-rw-r--r--test/unit/core.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/unit/core.js b/test/unit/core.js
index 252c9f99d..576deb7b9 100644
--- a/test/unit/core.js
+++ b/test/unit/core.js
@@ -711,7 +711,7 @@ test("jQuery.each(Object,Function)", function() {
});
test("jQuery.makeArray", function(){
- expect(15);
+ expect(17);
equals( jQuery.makeArray(jQuery('html>*'))[0].nodeName.toUpperCase(), "HEAD", "Pass makeArray a jQuery object" );
@@ -744,6 +744,10 @@ test("jQuery.makeArray", function(){
equals( jQuery.makeArray(/a/)[0].constructor, RegExp, "Pass makeArray a regex" );
ok( jQuery.makeArray(document.getElementById('form')).length >= 13, "Pass makeArray a form (treat as elements)" );
+
+ // For #5610
+ same( jQuery.makeArray({'length': '0'}), [], "Make sure object is coerced properly.");
+ same( jQuery.makeArray({'length': '5'}), [], "Make sure object is coerced properly.");
});
test("jQuery.isEmptyObject", function(){