From: Michał Gołębiowski-Owczarek Date: Mon, 12 Jun 2023 21:52:30 +0000 (+0200) Subject: Tests: Skip a new `.text()` test in IE 9 X-Git-Tag: 3.7.1~13 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b84146ce17cef7ec2ae2725ba62485368744de6c;p=jquery.git 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. --- 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 ) {