From 077e789f8d54ee7bfb0fc7ef66928ed3b5be1131 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Sun, 16 Aug 2020 02:18:52 +0100 Subject: [PATCH] Tests: Skip Map and Set cases for QUnit.objectType() on IE 11 IE 11 has a non-compliant implementation. For now, treat this as if it didn't implement these at all. --- test/main/utilities.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/main/utilities.js b/test/main/utilities.js index ac6a0a7eb..aa7a2fbf2 100644 --- a/test/main/utilities.js +++ b/test/main/utilities.js @@ -46,11 +46,13 @@ if ( typeof Symbol === "function" ) { validateObjectType( Symbol( "HI!" ), "symbol" ); } -if ( typeof Map === "function" ) { +// Support IE 11: Skip on IE11's non-compliant implementation +if ( typeof Map === "function" && ( new Map ).toString() !== "[object Object]" ) { validateObjectType( new Map( ), "map" ); } -if ( typeof Set === "function" ) { +// Support IE 11: Skip on IE11's non-compliant implementation +if ( typeof Set === "function" && ( new Set ).toString() !== "[object Object]" ) { validateObjectType( new Set( ), "set" ); }