aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2020-12-08 14:27:05 +0100
committerMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2020-12-08 14:27:05 +0100
commitbf06dd477a1bf829c68d64c7de9e2262ac8973bb (patch)
treefa9dff2653902f74bbc1bd0e430edee66e1481cb /test
parent1ec36332fca66d97a5c3bc7ac1b70692429f5be6 (diff)
downloadjquery-bf06dd477a1bf829c68d64c7de9e2262ac8973bb.tar.gz
jquery-bf06dd477a1bf829c68d64c7de9e2262ac8973bb.zip
Tests: Skip the jQuery.parseXML error reporting test in Legacy Edge
Legacy Edge, similarly to IE, doesn't report XML parsing errors but just tries to render the invalid document. Skip the error reporting test there, Edge Legacy will return a generic "Invalid XML" error, just like IE. Ref gh-4816
Diffstat (limited to 'test')
-rw-r--r--test/unit/core.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/unit/core.js b/test/unit/core.js
index a510c6b22..e45e493e0 100644
--- a/test/unit/core.js
+++ b/test/unit/core.js
@@ -1429,11 +1429,14 @@ QUnit.test( "jQuery.parseXML", function( assert ) {
}
} );
-// Support: IE 11+
+// Support: IE 11+, Edge 12 - 18 only
// IE throws an error when parsing invalid XML instead of reporting the error
-// in a `parsererror` element, skip the test there.
+// in a `parsererror` element, IE & Legacy Edge don't report errors in a parsererror
+// element; skip the test there.
QUnit[
- document.documentMode ? "skip" : "test"
+ document.documentMode || /edge\//i.test( navigator.userAgent ) ?
+ "skip" :
+ "test"
]( "jQuery.parseXML - error reporting", function( assert ) {
assert.expect( 2 );