Browse files

Disabling .add(form.elements) unit test.

  • Loading branch information...
1 parent bc7bb0d commit 9b00827ac90e0411ff2d106cb799465af18f703f @jeresig jeresig committed Apr 22, 2011
Showing with 7 additions and 2 deletions.
  1. +7 −2 test/unit/traversing.js
View
9 test/unit/traversing.js
@@ -480,10 +480,15 @@ test("contents()", function() {
});
test("add(String|Element|Array|undefined)", function() {
- expect(17);
+ expect(16);
same( jQuery("#sndp").add("#en").add("#sap").get(), q("sndp", "en", "sap"), "Check elements from document" );
same( jQuery("#sndp").add( jQuery("#en")[0] ).add( jQuery("#sap") ).get(), q("sndp", "en", "sap"), "Check elements from document" );
- ok( jQuery([]).add(jQuery("#form")[0].elements).length >= 13, "Check elements from array" );
+
+ // We no longer support .add(form.elements), unfortunately.
+ // There is no way, in browsers, to reliably determine the difference
+ // between form.elements and form - and doing .add(form) and having it
+ // add the form elements is way to unexpected, so this gets the boot.
+ // ok( jQuery([]).add(jQuery("#form")[0].elements).length >= 13, "Check elements from array" );
// For the time being, we're discontinuing support for jQuery(form.elements) since it's ambiguous in IE
// use jQuery([]).add(form.elements) instead.

0 comments on commit 9b00827

Please sign in to comment.