Skip to content
Permalink
Browse files

Discontinued the test for $(form.elements).

  • Loading branch information
jeresig committed Jan 14, 2008
1 parent 2e6c123 commit d0fae71464427d9b9e29a5e3fa27729675bef95a
Showing with 5 additions and 2 deletions.
  1. +5 −2 test/unit/core.js
@@ -252,11 +252,14 @@ test("get(Number)", function() {
});

test("add(String|Element|Array|undefined)", function() {
expect(9);
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, $($("#form")[0].elements).length, "Array in constructor must equals array in add()" );

// For the time being, we're discontinuing support for $(form.elements) since it's ambiguous in IE
// use $([]).add(form.elements) instead.
//equals( $([]).add($("#form")[0].elements).length, $($("#form")[0].elements).length, "Array in constructor must equals array in add()" );

var x = $([]).add($("<p id='x1'>xxx</p>")).add($("<p id='x2'>xxx</p>"));
ok( x[0].id == "x1", "Check on-the-fly element1" );

0 comments on commit d0fae71

Please sign in to comment.
You can’t perform that action at this time.