8000 Tests: Make `:has` selector tests not vulnerable to unrelated failures by mgol · Pull Request #5497 · jquery/jquery · GitHub
[go: up one dir, main page]

Skip to content

Tests: Make :has selector tests not vulnerable to unrelated failures #5497

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions test/unit/selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -986,10 +986,10 @@ QUnit.test( "pseudo - nth-last-of-type", function( assert ) {
QUnit[ QUnit.jQuerySelectors ? "test" : "skip" ]( "pseudo - has", function( assert ) {
assert.expect( 4 );

assert.t( "Basic test", "p:has(a)", [ "firstp", "ap", "en", "sap" ] );
assert.t( "Basic test (irrelevant whitespace)", "p:has( a )", [ "firstp", "ap", "en", "sap" ] );
assert.t( "Nested with overlapping candidates",
"#qunit-fixture div:has(div:has(div:not([id])))",
assert.selectInFixture( "Basic test", "p:has(a)", [ "firstp", "ap", "en", "sap" ] );
assert.selectInFixture( "Basic test (irrelevant whitespace)", "p:has( a )", [ "firstp", "ap", "en", "sap" ] );
assert.selectInFixture( "Nested with overlapping candidates",
"div:has(div:has(div:not([id])))",
[ "moretests", "t2037", "fx-test-group", "fx-queue" ] );

// Support: Safari 15.4+, Chrome 105+
Expand All @@ -998,8 +998,8 @@ QUnit[ QUnit.jQuerySelectors ? "test" : "skip" ]( "pseudo - has", function( asse
// return no results. Make sure this is accounted for. (gh-5098)
// Note: Chrome 105 has this behavior only in 105.0.5195.125 or newer;
// initially it shipped with a fully forgiving parsing in `:has()`.
assert.t( "Nested with list arguments",
"#qunit-fixture div:has(faketag, div:has(faketag, div:not([id])))",
assert.selectInFixture( "Nested with list arguments",
"div:has(faketag, div:has(faketag, div:not([id])))",
[ "moretests", "t2037", "fx-test-group", "fx-queue" ] );
} );

Expand Down
Loading
0