aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAriel Flesler <aflesler@gmail.com>2008-05-07 00:46:14 +0000
committerAriel Flesler <aflesler@gmail.com>2008-05-07 00:46:14 +0000
commit96ca83d1501a2ffa78332c35d4a7afefe600f1ee (patch)
tree45c884d748ab320409a1d7ead27cc5f3ef496763
parent4d41c71d3d923a1f38bd9ab320b8875fcc297639 (diff)
downloadjquery-96ca83d1501a2ffa78332c35d4a7afefe600f1ee.tar.gz
jquery-96ca83d1501a2ffa78332c35d4a7afefe600f1ee.zip
test runner: extra test for makeArray, related to [5481]
-rw-r--r--test/unit/core.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/unit/core.js b/test/unit/core.js
index 282747693..07ecd5aca 100644
--- a/test/unit/core.js
+++ b/test/unit/core.js
@@ -264,7 +264,7 @@ test("add(String|Element|Array|undefined)", function() {
expect(8);
isSet( $("#sndp").add("#en").add("#sap").get(), q("sndp", "en", "sap"), "Check elements from document" );
isSet( $("#sndp").add( $("#en")[0] ).add( $("#sap") ).get(), q("sndp", "en", "sap"), "Check elements from document" );
- ok( $([]).add($("#form")[0].elements).length >= 13, "Check elements from array" );
+ equals( $([]).add($("#form")[0].elements).length, 15, "Check elements from array" );
// For the time being, we're discontinuing support for $(form.elements) since it's ambiguous in IE
// use $([]).add(form.elements) instead.
@@ -279,7 +279,7 @@ test("add(String|Element|Array|undefined)", function() {
equals( x[1].id, "x2", "Check on-the-fly element2" );
var notDefined;
- equals( $([]).add(notDefined).length, 0, "Check that undefined adds nothing." );
+ equals( $([]).add(notDefined).length, 0, "Check that undefined adds nothing" );
});
test("each(Function)", function() {
@@ -1619,7 +1619,7 @@ test("contents()", function() {
});
test("$.makeArray", function(){
- expect(14);
+ expect(15);
equals( $.makeArray($('html>*'))[0].nodeName, "HEAD", "Pass makeArray a jQuery object" );
@@ -1649,4 +1649,6 @@ test("$.makeArray", function(){
equals( $.makeArray(window)[0], window, "Pass makeArray the window" );
equals( $.makeArray(/a/)[0].constructor, RegExp, "Pass makeArray a regex" );
+
+ equals( $.makeArray(document.getElementById('form')).length, 15, "Pass makeArray a form (treat as elements)" );
}); \ No newline at end of file