Tests: Skip the native :valid tests in IE 9

A newly added test making sure a native selector containing
the `:valid` pseudo works when no jQuery-specific selectors
are used was failing in IE 9 as that browser lacks support
for this pseudo. This commit disables that test in IE 9.

Ref gh-5178
This commit is contained in:
Michał Gołębiowski-Owczarek 2022-12-19 19:56:49 +01:00
parent 848de62542
commit 6b2094da79
No known key found for this signature in database

View File

@ -431,7 +431,11 @@ QUnit.test( "comma-separated", function( assert ) {
assert.equal( fixture.find( "h2\t,\rdiv p" ).filter( "h2" ).length, 1, "has to find one <h2>" );
} );
QUnit.test( "comma-separated, only supported natively (gh-5177)", function( assert ) {
// Support: IE 9 only
// IE 9 doesn't support the `:valid` pseudo natively; skip the test there.
QUnit[
/msie 9\.0/i.test( window.navigator.userAgent ) ? "skip" : "test"
]( "comma-separated, only supported natively (gh-5177)", function( assert ) {
assert.expect( 5 );
var fixture = jQuery( "<div><input/><span></span></div>" );