Skip to content

Commit 4f86cde

Browse files
committed
Add web-test-runner configuration file for Playwright testing and update GitHub Actions workflow to use the new configuration. Include specific version for @web/test-runner and adjust test command accordingly.
1 parent 76eaf11 commit 4f86cde

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.github/workflows/deployment.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ jobs:
3131
npm ci
3232
- name: Install test dependencies
3333
run: |
34-
npm install -D @playwright/test @web/test-runner-playwright
34+
npm install -D @playwright/test @web/test-runner-playwright @web/[email protected]
3535
npx playwright install --with-deps chromium firefox webkit
3636
- name: Run tests
37-
run: npx web-test-runner --config web-test-runner.config.mjs
37+
run: npx web-test-runner --config web-test-runner.config.cjs
3838
test_win:
3939
name: "Windows"
4040
runs-on: windows-latest
@@ -50,10 +50,10 @@ jobs:
5050
npm ci
5151
- name: Install test dependencies
5252
run: |
53-
npm install -D @playwright/test @web/test-runner-playwright
53+
npm install -D @playwright/test @web/test-runner-playwright @web/[email protected]
5454
npx playwright install --with-deps chromium firefox webkit
5555
- name: Run tests
56-
run: npx web-test-runner --config web-test-runner.config.mjs
56+
run: npx web-test-runner --config web-test-runner.config.cjs
5757
tag:
5858
name: "Publishing release"
5959
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'

web-test-runner.config.mjs renamed to web-test-runner.config.cjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { playwrightLauncher } from '@web/test-runner-playwright';
1+
const { playwrightLauncher } = require('@web/test-runner-playwright');
22

3-
export default {
3+
module.exports = {
44
files: 'test/**/*.test.js',
55
nodeResolve: true,
66
coverage: true,
@@ -27,4 +27,4 @@ export default {
2727
lines: 80
2828
}
2929
}
30-
};
30+
};

0 commit comments

Comments
 (0)