X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fcore.js;h=ea687c8f8fad5b90a66048e494b64091188bf3cc;hb=90b25efa6c3c3676c5ae1dd782d04726e03a31e8;hp=088726ff7c20f97767e745d095f6993fb8ab63b3;hpb=6496e4d9c419e447ac2d8a2e3623f07f74fd0860;p=jquery.git diff --git a/test/unit/core.js b/test/unit/core.js index 088726f..ea687c8 100644 --- a/test/unit/core.js +++ b/test/unit/core.js @@ -1058,11 +1058,13 @@ test("filter()", function() { }); test("not()", function() { - expect(5); + expect(7); ok( $("#main > p#ap > a").not("#google").length == 2, "not('selector')" ); + ok( $("#main > p#ap > a").not(document.getElementById("google")).length == 2, "not(DOMElement)" ); isSet( $("p").not(".result").get(), q("firstp", "ap", "sndp", "en", "sap", "first"), "not('.class')" ); isSet( $("p").not("#ap, #sndp, .result").get(), q("firstp", "en", "sap", "first"), "not('selector, selector')" ); isSet( $("p").not($("#ap, #sndp, .result")).get(), q("firstp", "en", "sap", "first"), "not(jQuery)" ); + ok( $("p").not(document.getElementsByTagName("p")).length == 0, "not(Array-like DOM collection)" ); isSet( $("#form option").not("option.emptyopt:contains('Nothing'),[selected],[value='1']").get(), q("option1c", "option1d", "option2c", "option3d" ), "not('complex selector')"); });