]> source.dussan.org Git - jquery.git/commitdiff
Tests: Align `:has` selector tests with `3.x-stable`
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Wed, 29 May 2024 16:32:59 +0000 (18:32 +0200)
committerGitHub <noreply@github.com>
Wed, 29 May 2024 16:32:59 +0000 (18:32 +0200)
Consistently use `assert.selectInFixture` instead of prepending the selector
with `#qunit-fixture ` manually.

Closes gh-5498
Ref gh-5497

test/unit/selector.js

index 419120e7d7e19b3f77901b4cd1df71c148701550..a414bfe3a7197750cbf250b5b9c34159edb1c643 100644 (file)
@@ -960,8 +960,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" ] );
 } );