diff options
author | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2019-07-29 21:14:46 +0200 |
---|---|---|
committer | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2019-07-29 21:19:21 +0200 |
commit | 47835965bd100a3661d8299d8b769ceeb8b6ce48 (patch) | |
tree | 5ef322bc48cd27d5a5f004e6e3fcf955c67fc9eb /test/unit/effects.js | |
parent | 79b74e043a4ee737d44a95094ff1184e40bd5b16 (diff) | |
download | jquery-47835965bd100a3661d8299d8b769ceeb8b6ce48.tar.gz jquery-47835965bd100a3661d8299d8b769ceeb8b6ce48.zip |
Selector: Inline Sizzle into the selector module
This commit removes Sizzle from jQuery, inlining its code & removing obsolete
workarounds where applicable.
The selector-native module has been removed. Further work on the selector
module may decrease the size enough that it will no longer be necessary. If
it turns out it's still useful, we'll reinstate it but the code will look
different anyway as we'll want to share as much code as possible with
the existing selector module.
The Sizzle AUTHORS.txt file has been merged with the jQuery one - people are
sorted by their first contributions to either of the two repositories.
The commit reduces the gzipped jQuery size by 1460 bytes compared to master.
Closes gh-4395
Diffstat (limited to 'test/unit/effects.js')
-rw-r--r-- | test/unit/effects.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/unit/effects.js b/test/unit/effects.js index c2e38fa86..13190dc5b 100644 --- a/test/unit/effects.js +++ b/test/unit/effects.js @@ -29,7 +29,7 @@ QUnit.module( "effects", { } } ); -QUnit[ jQuery.find.compile ? "test" : "skip" ]( "sanity check", function( assert ) { +QUnit[ QUnit.jQuerySelectors ? "test" : "skip" ]( "sanity check", function( assert ) { assert.expect( 1 ); assert.equal( jQuery( "#qunit-fixture:visible, #foo:visible" ).length, 2, "QUnit state is correct for testing effects" ); } ); @@ -809,7 +809,7 @@ QUnit.test( "stop( queue, ..., ... ) - Stop single queues", function( assert ) { this.clock.tick( 500 ); } ); -QUnit[ jQuery.find.compile ? "test" : "skip" ]( "toggle()", function( assert ) { +QUnit[ QUnit.jQuerySelectors ? "test" : "skip" ]( "toggle()", function( assert ) { assert.expect( 6 ); var x = jQuery( "#foo" ); assert.ok( x.is( ":visible" ), "is visible" ); @@ -1640,7 +1640,7 @@ QUnit.test( "animate should set display for disconnected nodes", function( asser clock.tick( 400 ); } ); -QUnit[ jQuery.find.compile ? "test" : "skip" ]( "Animation callback should not show animated element as :animated (#7157)", function( assert ) { +QUnit[ QUnit.jQuerySelectors ? "test" : "skip" ]( "Animation callback should not show animated element as :animated (#7157)", function( assert ) { assert.expect( 1 ); var foo = jQuery( "#foo" ); @@ -1653,7 +1653,7 @@ QUnit[ jQuery.find.compile ? "test" : "skip" ]( "Animation callback should not s this.clock.tick( 100 ); } ); -QUnit[ jQuery.find.compile ? "test" : "skip" ]( "Initial step callback should show element as :animated (#14623)", function( assert ) { +QUnit[ QUnit.jQuerySelectors ? "test" : "skip" ]( "Initial step callback should show element as :animated (#14623)", function( assert ) { assert.expect( 1 ); var foo = jQuery( "#foo" ); @@ -2169,7 +2169,7 @@ QUnit.test( ".finish() completes all queued animations", function( assert ) { } ); assert.equal( div.queue().length, 0, "empty queue when done" ); - if ( jQuery.find.compile ) { + if ( QUnit.jQuerySelectors ) { assert.equal( div.is( ":animated" ), false, ":animated doesn't match" ); } else { assert.ok( "skip", ":animated selector not supported with selector-native" ); @@ -2209,7 +2209,7 @@ QUnit.test( ".finish( false ) - unqueued animations", function( assert ) { assert.equal( parseFloat( div.css( prop ) ), value, prop + " finished at correct value" ); } ); - if ( jQuery.find.compile ) { + if ( QUnit.jQuerySelectors ) { assert.equal( div.is( ":animated" ), false, ":animated doesn't match" ); } else { assert.ok( "skip", ":animated selector not supported with selector-native" ); @@ -2248,7 +2248,7 @@ QUnit.test( ".finish( \"custom\" ) - custom queue animations", function( assert // start the first animation div.dequeue( "custom" ); - if ( jQuery.find.compile ) { + if ( QUnit.jQuerySelectors ) { assert.equal( div.is( ":animated" ), true, ":animated matches" ); } else { assert.ok( "skip", ":animated selector not supported with selector-native" ); @@ -2259,7 +2259,7 @@ QUnit.test( ".finish( \"custom\" ) - custom queue animations", function( assert assert.equal( parseFloat( div.css( prop ) ), value, prop + " finished at correct value" ); } ); - if ( jQuery.find.compile ) { + if ( QUnit.jQuerySelectors ) { assert.equal( div.is( ":animated" ), false, ":animated doesn't match" ); } else { assert.ok( "skip", ":animated selector not supported with selector-native" ); |