Skip to content
Permalink
Browse files
test for #2070
  • Loading branch information
jzaefferer committed Dec 17, 2007
1 parent 70ae356 commit ce4ab8a60e17ceafc3e67ddf4cc1b0526841a459
Showing with 4 additions and 1 deletion.
  1. +4 −1 test/unit/core.js
@@ -1058,14 +1058,17 @@ test("filter()", function() {
});

test("not()", function() {
expect(7);
expect(8);
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')");

var selects = $("#form select");
isSet( selects.not( selects[1] ), ["select1", "select3"], "filter out DOM element");
});

test("andSelf()", function() {

0 comments on commit ce4ab8a

Please sign in to comment.