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

Commit

Permalink
Add cross-browser testing
Browse files Browse the repository at this point in the history
  • Loading branch information
markcellus committed Mar 13, 2021
1 parent 0becf6c commit 47649f3
Show file tree
Hide file tree
Showing 5 changed files with 225 additions and 17 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
*.log
.coverage
.rpt2_cache
dist
dist
.env
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ dist
.npmrc
.prettierignore
LICENSE
.env
17 changes: 16 additions & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require('dotenv').config();

module.exports = function (config) {
config.set({
files: [{ pattern: 'tests/**/*.ts', type: 'module' }],
Expand All @@ -17,12 +19,25 @@ module.exports = function (config) {
{ type: 'text-summary' },
],
},
browserStack: {
username: process.env.BROWSERSTACK_USERNAME,
accessKey: process.env.BROWSERSTACK_ACCESS_KEY,
},
customLaunchers: {
chrome: {
base: 'BrowserStack',
browser: 'chrome',
os: 'OS X',
os_version: 'Big Sur',
browser_version: '83.0',
},
},
browsers: ['chrome'],
reporters: ['progress', 'coverage'],
frameworks: ['esm', 'mocha'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
browsers: ['ChromeHeadless'],
autoWatch: true,
singleRun: true,
concurrency: Infinity,
Expand Down
218 changes: 204 additions & 14 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@
"banner-cli": "^0.14.1",
"chai": "^4.2.0",
"coveralls": "^3.0.7",
"dotenv": "^8.2.0",
"eslint": "^7.16.0",
"karma": "^5.0.1",
"karma-chrome-launcher": "^3.1.0",
"karma-browserstack-launcher": "^1.6.0",
"karma-coverage": "^2.0.1",
"karma-mocha": "^2.0.0",
"mocha": "^8.0.1",
Expand Down

0 comments on commit 47649f3

Please sign in to comment.