Skip to content

Commit

Permalink
fix: ensure that Karma supports running tests on IE 11 (#3642)
Browse files Browse the repository at this point in the history
They were failing because of unsupported arrow function syntax in two places:
- in karma.spec.js file (only affecting Karma's own tests)
- in socket.io.js file installed from NPM, hence the dependency update (this affected Karma consumers)

Enabled BrowserStack tests on IE 11 to prevent regressions.
  • Loading branch information
devoto13 authored Feb 1, 2021
1 parent 7a1344f commit dbd1943
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 76 deletions.
94 changes: 47 additions & 47 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@
"qjobs": "^1.2.0",
"range-parser": "^1.2.1",
"rimraf": "^3.0.2",
"socket.io": "^3.0.4",
"socket.io": "^3.1.0",
"source-map": "^0.6.1",
"tmp": "0.2.1",
"ua-parser-js": "^0.7.23",
Expand Down
37 changes: 11 additions & 26 deletions test/client/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,35 +14,20 @@ const launchers = {
browser: 'firefox',
os: 'Windows',
os_version: '10'
}
},
// bs_safari: {
// base: 'BrowserStack',
// browser: 'safari',
// browser_version: '9.0',
// os_version: 'El Capitan',
// os: 'OS X'
// },
// bs_ie_11: {
// base: 'BrowserStack',
// browser: 'ie',
// browser_version: '11.0',
// os: 'Windows',
// os_version: '10'
// },
// bs_ie_10: {
// base: 'BrowserStack',
// browser: 'ie',
// browser_version: '10.0',
// os: 'Windows',
// os_version: '8'
// browser: 'Safari',
// os: 'OS X',
// os_version: 'Big Sur'
// },
// bs_ie_9: {
// base: 'BrowserStack',
// browser: 'ie',
// browser_version: '9.0',
// os: 'Windows',
// os_version: '7'
// }
bs_ie: {
base: 'BrowserStack',
browser: 'IE',
browser_version: '11.0',
os: 'Windows',
os_version: '10'
}
}

// Verify the install. This will run async but that's ok we'll see the log.
Expand Down
4 changes: 2 additions & 2 deletions test/client/karma.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('Karma', function () {
beforeEach(function () {
mockTestStatus = ''
updater = {
updateTestStatus: (s) => {
updateTestStatus: function (s) {
mockTestStatus = s
}
}
Expand Down Expand Up @@ -454,7 +454,7 @@ describe('Karma', function () {
clock.tick(500)

ck.complete()
setTimeout(() => {
setTimeout(function () {
assert(windowLocation.href === 'http://return.com')
done()
}, 5)
Expand Down

0 comments on commit dbd1943

Please sign in to comment.