Test for #2114
This commit is contained in:
parent
87d6bcec31
commit
948753842b
|
@ -214,10 +214,11 @@ test("get(Number)", function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
test("add(String|Element|Array|undefined)", function() {
|
test("add(String|Element|Array|undefined)", function() {
|
||||||
expect(8);
|
expect(9);
|
||||||
isSet( $("#sndp").add("#en").add("#sap").get(), q("sndp", "en", "sap"), "Check elements from document" );
|
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" );
|
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" );
|
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()" );
|
||||||
|
|
||||||
var x = $([]).add($("<p id='x1'>xxx</p>")).add($("<p id='x2'>xxx</p>"));
|
var x = $([]).add($("<p id='x1'>xxx</p>")).add($("<p id='x2'>xxx</p>"));
|
||||||
ok( x[0].id == "x1", "Check on-the-fly element1" );
|
ok( x[0].id == "x1", "Check on-the-fly element1" );
|
||||||
|
|
Loading…
Reference in a new issue