diff --git a/.eslintrc.json b/.eslintrc.json index f84612bdc..3b5f57d2b 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -41,7 +41,7 @@ "no-console": "error", "compat/compat": [ "error", - "android >= 4.3, firefox >= 45, ie >= 9, safari >= 9.1, ios_saf >= 7, chrome >= 58" + "android >= 4.3, firefox >= 45, ie >= 11, safari >= 9.1, ios_saf >= 7, chrome >= 58" ] } }, diff --git a/build/browserstack-full.json b/build/browserstack-full.json index d5fcf7753..e39097d2d 100644 --- a/build/browserstack-full.json +++ b/build/browserstack-full.json @@ -9,8 +9,6 @@ "firefox_78", "firefox_previous", "firefox_current", - "ie_9", - "ie_10", "ie_11", "edge_15", "edge_18", diff --git a/build/browserstack-quick.json b/build/browserstack-quick.json index 6c77e33bb..a0ee4ce31 100644 --- a/build/browserstack-quick.json +++ b/build/browserstack-quick.json @@ -7,7 +7,7 @@ "browsers": [ "firefox_45", "firefox_current", - "ie_9", + "ie_11", "safari_9.1", "safari_current", "opera_current", diff --git a/src/core/stacktrace.js b/src/core/stacktrace.js index 8205775ac..1ab07cc48 100644 --- a/src/core/stacktrace.js +++ b/src/core/stacktrace.js @@ -1,4 +1,3 @@ -// Doesn't support IE9, it will return undefined on these browsers // See also https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error/Stack const fileName = (sourceFromStacktrace(0) || '') .replace(/(:\d+)+\)?/, '') @@ -33,8 +32,9 @@ export function extractStacktrace (e, offset) { export function sourceFromStacktrace (offset) { let error = new Error(); - // Support: Safari <=7 only, IE <=10 - 11 only - // Not all browsers generate the `stack` property for `new Error()`, see also #636 + // Support: Safari <=7, IE 11 + // Not all browsers generate the `stack` property for `new Error()` + // See also https://github.com/qunitjs/qunit/issues/636 if (!error.stack) { try { throw error; diff --git a/src/globals.js b/src/globals.js index 396b6ff4b..26e0e614f 100644 --- a/src/globals.js +++ b/src/globals.js @@ -64,7 +64,7 @@ export const localSessionStorage = (function () { }()); // Basic fallback for ES6 Map -// Support: IE 9-10, Safari 7, PhantomJS; Map is undefined +// Support: Safari 7, PhantomJS; Map is undefined // Support: iOS 8; `new Map(iterable)` is not supported // // Fallback for ES7 Map#keys diff --git a/src/logger.js b/src/logger.js index 024fc032d..2034387ea 100644 --- a/src/logger.js +++ b/src/logger.js @@ -1,18 +1,10 @@ import { console } from './globals'; -// Support: IE 9 -// Detect if the console object exists and no-op otherwise. -// This allows support for IE 9, which doesn't have a console -// object if the developer tools are not open. - -// Support: IE 9 -// Function#bind is supported, but no console.log.bind(). - // Support: SpiderMonkey (mozjs 68+) // The console object has a log method, but no warn method. export default { warn: console - ? Function.prototype.bind.call(console.warn || console.log, console) + ? (console.warn || console.log).bind(console) : function () {} }; diff --git a/src/reporters/ConsoleReporter.js b/src/reporters/ConsoleReporter.js index 0a4143fca..688664299 100644 --- a/src/reporters/ConsoleReporter.js +++ b/src/reporters/ConsoleReporter.js @@ -5,8 +5,7 @@ export default class ConsoleReporter { // Cache references to console methods to ensure we can report failures // from tests tests that mock the console object itself. // https://github.com/qunitjs/qunit/issues/1340 - // Support IE 9: Function#bind is supported, but no console.log.bind(). - this.log = options.log || Function.prototype.bind.call(console.log, console); + this.log = options.log || console.log.bind(console); runner.on('error', this.onError.bind(this)); runner.on('runStart', this.onRunStart.bind(this)); diff --git a/src/reporters/TapReporter.js b/src/reporters/TapReporter.js index b947995f8..b662965a4 100644 --- a/src/reporters/TapReporter.js +++ b/src/reporters/TapReporter.js @@ -42,7 +42,7 @@ function prettyYamlValue (value, indent = 4) { value = String(value); } - // Support IE 9-11: Use isFinite instead of ES6 Number.isFinite + // Support IE 11: Use isFinite instead of ES6 Number.isFinite if (typeof value === 'number' && !isFinite(value)) { // Turn NaN and Infinity into simple strings. // Paranoia: Don't return directly just in case there's @@ -93,7 +93,7 @@ function prettyYamlValue (value, indent = 4) { } // See also - // Support IE 9-11: Avoid ES6 String#repeat + // Support IE 11: Avoid ES6 String#repeat const prefix = (new Array(indent + 1)).join(' '); const trailingLinebreakMatch = value.match(/\n+$/); @@ -174,8 +174,7 @@ export default class TapReporter { // Cache references to console methods to ensure we can report failures // from tests tests that mock the console object itself. // https://github.com/qunitjs/qunit/issues/1340 - // Support IE 9: Function#bind is supported, but no console.log.bind(). - this.log = options.log || Function.prototype.bind.call(console.log, console); + this.log = options.log || console.log.bind(console); this.testCount = 0; this.ended = false; diff --git a/test/main/assert.js b/test/main/assert.js index 528f1e482..7561d4b37 100644 --- a/test/main/assert.js +++ b/test/main/assert.js @@ -1,5 +1,4 @@ function buildMockPromise (settledValue, shouldFulfill) { - // Support IE 9: Promise not supported, test MUST NOT load polyfil globally. // Support SpiderMonkey: setTimeout is not supported, but native Promise is. var defer = typeof setTimeout !== 'undefined' // eslint-disable-next-line no-undef @@ -362,8 +361,6 @@ QUnit.test('throws', function (assert) { ); }, /^Error: assert\.throws does not accept a string value for the expected argument/); - // This test is for IE 7 and prior which does not properly - // implement Error.prototype.toString assert.throws( function () { throw new Error('error message'); @@ -396,10 +393,6 @@ QUnit.test('throws', function (assert) { 'thrown TypeError with a message is an instance of Error' ); - // This test is for IE 8 and prior which goes against the standards - // by considering that the native Error constructors, such TypeError, - // are also instances of the Error constructor. As such, the assertion - // sometimes went down the wrong path. assert.throws( function () { throw new TypeError('error message'); @@ -604,8 +597,6 @@ QUnit.test('rejects', function (assert) { "simple string rejection, no 'expected' value given" ); - // This test is for IE 7 and prior which does not properly - // implement Error.prototype.toString assert.rejects( buildMockPromise(new Error('error message')), /error message/, @@ -630,10 +621,6 @@ QUnit.test('rejects', function (assert) { 'thrown TypeError with a message is an instance of Error' ); - // This test is for IE 8 and prior which goes against the standards - // by considering that the native Error constructors, such TypeError, - // are also instances of the Error constructor. As such, the assertion - // sometimes went down the wrong path. assert.rejects( buildMockPromise(new TypeError('error message')), TypeError, diff --git a/test/main/promise.js b/test/main/promise.js index a828bb331..1ad7e0fa4 100644 --- a/test/main/promise.js +++ b/test/main/promise.js @@ -1,4 +1,3 @@ -// Support IE 9: Promise not supported, test MUST NOT load polyfil globally. // Support SpiderMonkey: setTimeout is not supported, but native Promise is. var defer = typeof setTimeout !== 'undefined' // eslint-disable-next-line no-undef diff --git a/test/webWorker.js b/test/webWorker.js index 530c3e2e1..bd48f1d77 100644 --- a/test/webWorker.js +++ b/test/webWorker.js @@ -1,11 +1,7 @@ /* eslint-env browser */ QUnit.module('Web Worker'); -// Support: IE 9 -/* eslint-disable compat/compat */ -var testMethod = window.Worker ? 'test' : 'skip'; - -QUnit[testMethod]('main tests', function (assert) { +QUnit.test('main tests', function (assert) { assert.expect(1); var done = assert.async(); var worker = new Worker('webWorker-worker.js');