X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=test%2Funit%2Fselector.js;h=ac0641870b1fafd79c1da06addf15539b48c4185;hb=1e9d6e1255f94a4643770bb498e875d4016c0781;hp=382ca5001822ad8f9b3cc9cb04d0070e84ef6170;hpb=f0505c6d75722d5617dedfd5f6165285c18103c8;p=jquery.git diff --git a/test/unit/selector.js b/test/unit/selector.js index 382ca50..ac06418 100644 --- a/test/unit/selector.js +++ b/test/unit/selector.js @@ -2,7 +2,7 @@ module("selector"); test("element", function() { expect(19); - reset(); + QUnit.reset(); ok( jQuery("*").size() >= 30, "Select all" ); var all = jQuery("*"), good = true; @@ -53,10 +53,11 @@ if ( location.protocol != "file:" ) { } test("broken", function() { - expect(7); + expect(8); function broken(name, selector) { try { jQuery(selector); + ok( false, name + ": " + selector ); } catch(e){ ok( typeof e === "string" && e.indexOf("Syntax error") >= 0, name + ": " + selector ); @@ -70,6 +71,7 @@ test("broken", function() { broken( "Broken Selector", "()", [] ); broken( "Broken Selector", "<>", [] ); broken( "Broken Selector", "{}", [] ); + broken( "Doesn't exist", ":visble", [] ); }); test("id", function() { @@ -290,7 +292,7 @@ test("pseudo - child", function() { t( "First Child", "p:first-child", [] ); - reset(); + QUnit.reset(); t( "Last Child", "p:last-child", ["sap"] ); t( "Last Child", "a:last-child", ["simon1","anchor1","mark","yahoo","anchor2","simon","liveLink1","liveLink2"] );