X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fjquery%2FcoreTest.js;h=ccd84f72b770cb0ed8a98a261ccb5b5673433a4a;hb=7b439921c48070e7b01ebda3580e0ada01a082b5;hp=ed7b52ba8408908934ec2b8d40085bd15d7b1191;hpb=200319ea6b6a59daebce1cfc1d330a9d52c208c0;p=jquery.git diff --git a/src/jquery/coreTest.js b/src/jquery/coreTest.js index ed7b52b..ccd84f7 100644 --- a/src/jquery/coreTest.js +++ b/src/jquery/coreTest.js @@ -472,9 +472,8 @@ test("html(String)", function() { }); test("filter()", function() { - expect(5); + expect(4); isSet( $("input").filter(":checked").get(), q("radio2", "check1"), "filter(String)" ); - isSet( $("p").filter(["#ap", "#sndp"]).get(), q("ap", "sndp"), "filter(Array<String>)" ); isSet( $("p").filter("#ap, #sndp").get(), q("ap", "sndp"), "filter('String, String')" ); isSet( $("p").filter("#ap,#sndp").get(), q("ap", "sndp"), "filter('String,String')" ); isSet( $("p").filter(function() { return !$("a", this).length }).get(), q("sndp", "first"), "filter(Function)" ); @@ -483,7 +482,7 @@ test("filter()", function() { test("not(String)", function() { expect(2); ok( $("#main > p#ap > a").not("#google").length == 2, "not('selector')" ); - isSet( $("p").not("#ap, #sndp").get(), q("firstp", "en", "sap", "first", "result"), "not('selector, selector')" ); + isSet( $("p").not("#ap, #sndp, .result").get(), q("firstp", "en", "sap", "first"), "not('selector, selector')" ); }); @@ -644,7 +643,7 @@ test("empty()", function() { test("eq(), gt(), lt(), contains()", function() { ok( $("#ap a").eq(1)[0].id == "groups", "eq()" ); - ok( $("#ap a").gt(1).get(), q("groups", "anchor1", "mark"), "gt()" ); - ok( $("#ap a").lt(2).get(), q("google", "groups", "anchor1"), "lt()" ); - ok( $("#foo a").contains("log").get(), q("anchor2", "simon"), "contains()" ); -}); \ No newline at end of file + isSet( $("#ap a").gt(0).get(), q("groups", "anchor1", "mark"), "gt()" ); + isSet( $("#ap a").lt(3).get(), q("google", "groups", "anchor1"), "lt()" ); + isSet( $("#foo a").contains("log").get(), q("anchor2", "simon"), "contains()" ); +});