Skip to content

Commit

Permalink
chore: fix firefox test runner
Browse files Browse the repository at this point in the history
  • Loading branch information
smalluban committed Jan 8, 2024
1 parent 435befc commit 311cef1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ jobs:
node-version: 19
cache: "npm"
- uses: browser-actions/setup-chrome@latest
- uses: browser-actions/setup-firefox@latest

- name: Install dependencies
run: |
npm install
npx playwright install-deps webkit
npm test:prepare
- name: Run tests
run: |
npm run test
Expand Down
4 changes: 3 additions & 1 deletion karma.conf.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const playwright = require("playwright");

process.env.WEBKIT_HEADLESS_BIN = playwright.webkit.executablePath();
process.env.FIREFOX_BIN = playwright.firefox.executablePath();

const IS_COVERAGE = process.env.NODE_ENV === "coverage";

module.exports = (config) => {
Expand Down Expand Up @@ -34,7 +36,7 @@ module.exports = (config) => {
},
autoWatch: true,
singleRun: true,
concurrency: process.env.GITHUB_ACTIONS ? 1 : Infinity,
concurrency: 1,
port: 9876 + Number(IS_COVERAGE),
});
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"dev:coverage": "rm -rf ./coverage && NODE_ENV=coverage npm run dev",
"lint": "eslint ./src",
"test": "npm run test:cli && npm run lint && npm run karma",
"test:prepare": "playwright install firefox webkit",
"test:coverage": "rm -rf ./coverage && NODE_ENV=coverage npm run karma",
"test:cli": "node ./cli/test.js",
"release": "npm run test && standard-version -a"
Expand Down

0 comments on commit 311cef1

Please sign in to comment.