Skip to content

Commit

Permalink
Tests: Skip a new .text() test in IE 9
Browse files Browse the repository at this point in the history
The test depends on `DOMParser`'s `parseFromString` called with `text/html`
which is not supported in IE 9.
  • Loading branch information
mgol committed Jun 12, 2023
1 parent 44c56f8 commit b84146c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/unit/manipulation.js
Expand Up @@ -53,8 +53,12 @@ QUnit.test( "text()", function( assert ) {

$newLineTest.remove();

doc = new DOMParser().parseFromString( "<span>example</span>", "text/html" );
assert.equal( jQuery( doc ).text(), "example", "text() on HTMLDocument (gh-5264)" );
if ( !document.documentMode || document.documentMode > 9 ) {
doc = new DOMParser().parseFromString( "<span>example</span>", "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 ) {
Expand Down

0 comments on commit b84146c

Please sign in to comment.