Skip to content
This repository was archived by the owner on Feb 11, 2023. It is now read-only.

Commit 47649f3

Browse files
committed
Add cross-browser testing
1 parent 0becf6c commit 47649f3

File tree

5 files changed

+225
-17
lines changed

5 files changed

+225
-17
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@
88
*.log
99
.coverage
1010
.rpt2_cache
11-
dist
11+
dist
12+
.env

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ dist
66
.npmrc
77
.prettierignore
88
LICENSE
9+
.env

karma.conf.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
require('dotenv').config();
2+
13
module.exports = function (config) {
24
config.set({
35
files: [{ pattern: 'tests/**/*.ts', type: 'module' }],
@@ -17,12 +19,25 @@ module.exports = function (config) {
1719
{ type: 'text-summary' },
1820
],
1921
},
22+
browserStack: {
23+
username: process.env.BROWSERSTACK_USERNAME,
24+
accessKey: process.env.BROWSERSTACK_ACCESS_KEY,
25+
},
26+
customLaunchers: {
27+
chrome: {
28+
base: 'BrowserStack',
29+
browser: 'chrome',
30+
os: 'OS X',
31+
os_version: 'Big Sur',
32+
browser_version: '83.0',
33+
},
34+
},
35+
browsers: ['chrome'],
2036
reporters: ['progress', 'coverage'],
2137
frameworks: ['esm', 'mocha'],
2238
port: 9876,
2339
colors: true,
2440
logLevel: config.LOG_INFO,
25-
browsers: ['ChromeHeadless'],
2641
autoWatch: true,
2742
singleRun: true,
2843
concurrency: Infinity,

package-lock.json

Lines changed: 204 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,10 @@
6060
"banner-cli": "^0.14.1",
6161
"chai": "^4.2.0",
6262
"coveralls": "^3.0.7",
63+
"dotenv": "^8.2.0",
6364
"eslint": "^7.16.0",
6465
"karma": "^5.0.1",
65-
"karma-chrome-launcher": "^3.1.0",
66+
"karma-browserstack-launcher": "^1.6.0",
6667
"karma-coverage": "^2.0.1",
6768
"karma-mocha": "^2.0.0",
6869
"mocha": "^8.0.1",

0 commit comments

Comments
 (0)