]> source.dussan.org Git - jquery.git/commitdiff
Bringing some selector tests back from Sizzle.
authorjeresig <jeresig@gmail.com>
Tue, 12 Jan 2010 04:55:02 +0000 (23:55 -0500)
committerjeresig <jeresig@gmail.com>
Tue, 12 Jan 2010 04:55:02 +0000 (23:55 -0500)
test/unit/selector.js

index 382ca5001822ad8f9b3cc9cb04d0070e84ef6170..498ac567b1fe16541aaa447a8acd678dc7fa5fa4 100644 (file)
@@ -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() {