aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/traversing.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/traversing.js')
-rw-r--r--test/unit/traversing.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/test/unit/traversing.js b/test/unit/traversing.js
index b540c3093..638e7984a 100644
--- a/test/unit/traversing.js
+++ b/test/unit/traversing.js
@@ -13,7 +13,7 @@ QUnit.test( "find(String) under non-elements", function( assert ) {
assert.equal( j.find( "div" ).addBack().length, 3, "Check node,textnode,comment to find zero divs, but preserves pushStack" );
} );
-QUnit[ jQuery.find.compile ? "test" : "skip" ]( "find(leading combinator)", function( assert ) {
+QUnit[ QUnit.jQuerySelectors ? "test" : "skip" ]( "find(leading combinator)", function( assert ) {
assert.expect( 4 );
assert.deepEqual( jQuery( "#qunit-fixture" ).find( "> div" ).get(), q( "foo", "nothiddendiv", "moretests", "tabindex-tests", "liveHandlerOrder", "siblingTest", "fx-test-group" ), "find child elements" );
@@ -104,7 +104,7 @@ QUnit.test( "is(String)", function( assert ) {
assert.ok( jQuery( input ).is( "input[data-pos=':first']" ),
"attribute-equals POS in string" );
- if ( jQuery.find.compile ) {
+ if ( QUnit.jQuerySelectors ) {
assert.ok( jQuery( input ).is( ":input[data-pos=':first']" ),
"attribute-equals POS in string after pseudo" );
} else {
@@ -115,7 +115,7 @@ QUnit.test( "is(String)", function( assert ) {
assert.ok( jQuery( option ).is( "[id=option1a]" ),
"id attribute-equals identifier" );
- if ( jQuery.find.compile ) {
+ if ( QUnit.jQuerySelectors ) {
assert.ok( jQuery( option ).is( "[id*=option1][type!=checkbox]" ),
"attribute-not-equals identifier" );
} else {
@@ -185,7 +185,7 @@ QUnit.test( "is(jQuery)", function( assert ) {
assert.ok( !jQuery( "#simon" ).is( jQuery( ".blogTest" )[ 0 ] ), "Check for multiple classes: Expected classes 'blog' and 'link', but not 'blogTest'" );
} );
-QUnit[ jQuery.find.compile ? "test" : "skip" ]( "is() with :has() selectors", function( assert ) {
+QUnit[ QUnit.jQuerySelectors ? "test" : "skip" ]( "is() with :has() selectors", function( assert ) {
assert.expect( 6 );
assert.ok( jQuery( "#foo" ).is( ":has(p)" ), "Check for child: Expected a child 'p' element" );
@@ -197,7 +197,7 @@ QUnit[ jQuery.find.compile ? "test" : "skip" ]( "is() with :has() selectors", fu
assert.ok( !jQuery( "#foo" ).is( jQuery( "div:has(ul)" ) ), "Check for child: Did not expect 'ul' element" );
} );
-QUnit[ jQuery.find.compile ? "test" : "skip" ]( "is() with positional selectors", function( assert ) {
+QUnit[ QUnit.jQuerySelectorsPos ? "test" : "skip" ]( "is() with positional selectors", function( assert ) {
assert.expect( 27 );
var
@@ -334,7 +334,7 @@ QUnit.test( "filter(jQuery)", function( assert ) {
assert.deepEqual( jQuery( "#form input" ).filter( elements ).get(), q( "text1" ), "filter(Element)" );
} );
-QUnit[ jQuery.find.compile ? "test" : "skip" ]( "filter() with positional selectors", function( assert ) {
+QUnit[ QUnit.jQuerySelectorsPos ? "test" : "skip" ]( "filter() with positional selectors", function( assert ) {
assert.expect( 19 );
var filterit = function( sel, filter, length ) {
@@ -415,7 +415,7 @@ QUnit.test( "closest()", function( assert ) {
assert.deepEqual( jq.contents().closest( "*" ).get(), jq.get(), "Text node input (#13332)" );
} );
-QUnit[ jQuery.find.compile ? "test" : "skip" ]( "closest() with positional selectors", function( assert ) {
+QUnit[ QUnit.jQuerySelectorsPos ? "test" : "skip" ]( "closest() with positional selectors", function( assert ) {
assert.expect( 3 );
assert.deepEqual( jQuery( "#qunit-fixture" ).closest( "div:first" ).get(), [],
@@ -445,7 +445,7 @@ QUnit.test( "closest(jQuery)", function( assert ) {
assert.ok( $child.closest( $body.add( $parent ) ).is( "#nothiddendiv" ), "Closest ancestor retrieved." );
} );
-QUnit[ jQuery.find.compile ? "test" : "skip" ]( "not(Selector)", function( assert ) {
+QUnit[ QUnit.jQuerySelectors ? "test" : "skip" ]( "not(Selector)", function( assert ) {
assert.expect( 7 );
assert.equal( jQuery( "#qunit-fixture > p#ap > a" ).not( "#google" ).length, 2, "not('selector')" );
@@ -525,7 +525,7 @@ QUnit.test( "not(jQuery)", function( assert ) {
);
} );
-QUnit[ jQuery.find.compile ? "test" : "skip" ]( "not(Selector) excludes non-element nodes (gh-2808)", function( assert ) {
+QUnit[ QUnit.jQuerySelectors ? "test" : "skip" ]( "not(Selector) excludes non-element nodes (gh-2808)", function( assert ) {
assert.expect( 3 );
var mixedContents = jQuery( "#nonnodes" ).contents(),
@@ -628,7 +628,7 @@ QUnit.test( "siblings([String])", function( assert ) {
assert.equal( jQuery( "<a/>" ).siblings().length, 0, "Detached elements have no siblings (#11370)" );
} );
-QUnit[ jQuery.find.compile ? "test" : "skip" ]( "siblings([String])", function( assert ) {
+QUnit[ QUnit.jQuerySelectors ? "test" : "skip" ]( "siblings([String])", function( assert ) {
assert.expect( 2 );
assert.deepEqual( jQuery( "#sndp" ).siblings( ":has(code)" ).get(), q( "sap" ), "Check for filtered siblings (has code child element)" );
assert.deepEqual( jQuery( "#sndp" ).siblings( ":has(a)" ).get(), q( "en", "sap" ), "Check for filtered siblings (has anchor child element)" );
@@ -640,7 +640,7 @@ QUnit.test( "children([String])", function( assert ) {
assert.deepEqual( jQuery( "#foo" ).children( "#en, #sap" ).get(), q( "en", "sap" ), "Check for multiple filters" );
} );
-QUnit[ jQuery.find.compile ? "test" : "skip" ]( "children([String])", function( assert ) {
+QUnit[ QUnit.jQuerySelectors ? "test" : "skip" ]( "children([String])", function( assert ) {
assert.expect( 1 );
assert.deepEqual( jQuery( "#foo" ).children( ":has(code)" ).get(), q( "sndp", "sap" ), "Check for filtered children" );
} );