diff options
author | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2023-06-12 23:52:30 +0200 |
---|---|---|
committer | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2023-06-12 23:52:30 +0200 |
commit | b84146ce17cef7ec2ae2725ba62485368744de6c (patch) | |
tree | 175be3fb9595e9742ad9d7c235fa1c0ed20e2743 /test | |
parent | 44c56f87a31fbc1f43ac575cfd06a0df12073352 (diff) | |
download | jquery-b84146ce17cef7ec2ae2725ba62485368744de6c.tar.gz jquery-b84146ce17cef7ec2ae2725ba62485368744de6c.zip |
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.
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/manipulation.js | 8 |
1 files 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( "<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 ) { |