aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/deprecated.js
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2024-11-04 23:59:30 +0100
committerGitHub <noreply@github.com>2024-11-04 23:59:30 +0100
commit329661fd538a07993a2fcfa2a75fdd7f5667f86c (patch)
treea6e175eb264024baa819f8926c83deb8f38f9d27 /test/unit/deprecated.js
parent07c9f02bd6cf27c0e1e38345c97f5c3e2718134f (diff)
downloadjquery-329661fd538a07993a2fcfa2a75fdd7f5667f86c.tar.gz
jquery-329661fd538a07993a2fcfa2a75fdd7f5667f86c.zip
Selector: Properly deprecate `jQuery.expr[ ":" ]`/`jQuery.expr.filters`
Those APIs have formally been deprecated since `3.0.0`, but they never made its way into the deprecated module. `jQuery.expr[ ":" ]` has been removed when Sizzle got inlined into Core in gh-4395; this change restores it. Closes gh-5580 Ref gh-5570 Ref gh-4395
Diffstat (limited to 'test/unit/deprecated.js')
-rw-r--r--test/unit/deprecated.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/unit/deprecated.js b/test/unit/deprecated.js
index 5eb099c45..dd9aaee9c 100644
--- a/test/unit/deprecated.js
+++ b/test/unit/deprecated.js
@@ -205,4 +205,17 @@ QUnit.test( "jQuery.proxy", function( assert ) {
cb.call( thisObject, "arg3" );
} );
+if ( includesModule( "selector" ) ) {
+ QUnit[ QUnit.jQuerySelectors ? "test" : "skip" ](
+ "jQuery.expr[ \":\" ], jQuery.expr.filters",
+ function( assert ) {
+ assert.expect( 2 );
+
+ assert.strictEqual( jQuery.expr[ ":" ], jQuery.expr.pseudos,
+ "jQuery.expr[ \":\" ] is an alias of jQuery.expr.pseudos" );
+ assert.strictEqual( jQuery.expr.filters, jQuery.expr.pseudos,
+ "jQuery.expr.filters is an alias of jQuery.expr.pseudos" );
+ } );
+}
+
}