diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2008-01-04 11:33:34 +0000 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2008-01-04 11:33:34 +0000 |
commit | 948753842bd5aeda6ad6e27c269d706675f488d1 (patch) | |
tree | 0d17b97bb4bf80c24b754e01c05ce91aa0a8b1fe /test | |
parent | 87d6bcec31046d84d1b4518d0888f1715e15e60b (diff) | |
download | jquery-948753842bd5aeda6ad6e27c269d706675f488d1.tar.gz jquery-948753842bd5aeda6ad6e27c269d706675f488d1.zip |
Test for #2114
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/core.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/unit/core.js b/test/unit/core.js index 932d0a5e4..835dde61e 100644 --- a/test/unit/core.js +++ b/test/unit/core.js @@ -214,10 +214,11 @@ test("get(Number)", 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")[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()" ); var x = $([]).add($("<p id='x1'>xxx</p>")).add($("<p id='x2'>xxx</p>")); ok( x[0].id == "x1", "Check on-the-fly element1" ); |