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
This commit is contained in:
Michał Gołębiowski-Owczarek 2020-12-08 14:27:05 +01:00
parent 1ec36332fc
commit bf06dd477a

View File

@ -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 );