Skip to content

Commit 4801f0f

Browse files
authored
fix: Stop running polyfill tests in Chrome; they fail because of its native implementation (#32)
2 parents 7ef2edb + 147223d commit 4801f0f

File tree

5 files changed

+32
-7
lines changed

5 files changed

+32
-7
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
node-version: 22
2525
registry-url: https://registry.npmjs.org/
2626
cache: npm
27-
- run: npm ci --legacy-peer-deps
27+
- run: npm ci
2828
- run: npm version ${TAG_NAME} --git-tag-version=false
2929
env:
3030
TAG_NAME: ${{ github.event.release.tag_name }}

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ jobs:
1616
- uses: actions/setup-node@v4
1717
with:
1818
node-version: 22
19-
- run: npm ci --legacy-peer-deps
20-
- run: npm test
19+
- run: npm ci
20+
- run: npm test

package-lock.json

Lines changed: 17 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@
1717
},
1818
"files": [],
1919
"scripts": {
20-
"test": "web-test-runner",
20+
"test": "npx playwright install firefox && web-test-runner",
2121
"test:guidepup": "npx playwright test"
2222
},
2323
"devDependencies": {
2424
"@esm-bundle/chai": "^4.3.4-fix.0",
2525
"@guidepup/guidepup": "^0.24.0",
2626
"@guidepup/playwright": "^0.14.1",
2727
"@playwright/test": "^1.48.0",
28-
"@web/test-runner": "^0.20.1"
28+
"@web/test-runner": "^0.20.1",
29+
"@web/test-runner-playwright": "^0.11.1"
2930
}
30-
}
31+
}

web-test-runner.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1+
import { playwrightLauncher } from '@web/test-runner-playwright';
2+
13
export default {
24
files: "tests/web-test-runner/*.test.html",
35
coverage: true,
46
nodeResolve: true,
7+
browsers: [
8+
playwrightLauncher({
9+
product: 'firefox', // Use Firefox instead of Chrome (web-test-runner’s default), because Firefox doesn’t have a native implementation of 'ariaNotify' (as of 2025-11-07), so we can test the polyfill in it.
10+
launchOptions: { headless: true }
11+
}),
12+
],
513
plugins: [
614
{
715
name: "include-polyfill",

0 commit comments

Comments
 (0)