From 6b2094da797087b027b453b15efe28b947641e80 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20Go=C5=82=C4=99biowski-Owczarek?= Date: Mon, 19 Dec 2022 19:56:49 +0100 Subject: [PATCH] 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 --- test/unit/selector.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/unit/selector.js b/test/unit/selector.js index 874692eaa..80a2797fd 100644 --- a/test/unit/selector.js +++ b/test/unit/selector.js @@ -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

" ); } ); -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( "
" ); -- 2.39.5