Bringing some selector tests back from Sizzle.
This commit is contained in:
parent
6114565ab5
commit
4151ddef9d
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue