From b84146ce17cef7ec2ae2725ba62485368744de6c Mon Sep 17 00:00:00 2001 From: Michał Gołębiowski-Owczarek Date: Mon, 12 Jun 2023 23:52:30 +0200 Subject: Tests: Skip a new `.text()` test in IE 9 The test depends on `DOMParser`'s `parseFromString` called with `text/html` which is not supported in IE 9. --- test/unit/manipulation.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js index 8f7e8f663..d384b403f 100644 --- a/test/unit/manipulation.js +++ b/test/unit/manipulation.js @@ -53,8 +53,12 @@ QUnit.test( "text()", function( assert ) { $newLineTest.remove(); - doc = new DOMParser().parseFromString( "example", "text/html" ); - assert.equal( jQuery( doc ).text(), "example", "text() on HTMLDocument (gh-5264)" ); + if ( !document.documentMode || document.documentMode > 9 ) { + doc = new DOMParser().parseFromString( "example", "text/html" ); + assert.equal( jQuery( doc ).text(), "example", "text() on HTMLDocument (gh-5264)" ); + } else { + assert.ok( true, "IE 9 doesn't support DOMParser's parseFromString with text/html" ); + } } ); QUnit.test( "text(undefined)", function( assert ) { -- cgit v1.2.3