Skip to content

Commit 32b1082

Browse files
authored
Merge pull request #1272 from basecamp/flavorjones/replace-karma-with-wtr
Replace Karma with `@web/test-runner`
2 parents 5c8b688 + c20a85d commit 32b1082

File tree

6 files changed

+1599
-1647
lines changed

6 files changed

+1599
-1647
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ jobs:
3838
tunnelName: ${{ env.SAUCE_TUNNEL_IDENTIFIER }}
3939
region: ${{ env.SAUCE_REGION }}
4040
proxyLocalhost: allow
41+
- name: Install Playwright Browsers
42+
if: ${{ env.SAUCE_ACCESS_KEY == '' }}
43+
run: npx playwright install --with-deps chromium
4144
- run: bin/ci
4245
- name: Fail when generated npm changes are not checked-in
4346
run: |

action_text-trix/app/assets/javascripts/trix.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,15 @@ Copyright © 2025 37signals, LLC
4343
"@rollup/plugin-json": "^4.1.0",
4444
"@rollup/plugin-node-resolve": "^13.3.0",
4545
"@web/dev-server": "^0.1.34",
46+
"@web/test-runner": "^0.20.2",
47+
"@web/test-runner-playwright": "^0.11.1",
48+
"@web/test-runner-webdriver": "^0.9.0",
4649
"babel-eslint": "^10.1.0",
4750
chokidar: "^4.0.2",
4851
concurrently: "^7.4.0",
4952
eslint: "^7.32.0",
5053
esm: "^3.2.25",
5154
idiomorph: "^0.7.3",
52-
karma: "6.4.1",
53-
"karma-chrome-launcher": "3.2.0",
54-
"karma-qunit": "^4.1.2",
55-
"karma-sauce-launcher": "^4.3.6",
5655
qunit: "2.19.1",
5756
rangy: "^1.3.0",
5857
rollup: "^2.56.3",
@@ -74,7 +73,8 @@ Copyright © 2025 37signals, LLC
7473
watch: "rollup -c -w",
7574
lint: "eslint .",
7675
pretest: "yarn run lint && yarn run build",
77-
test: "karma start",
76+
test: "web-test-runner",
77+
"test:watch": "web-test-runner --watch",
7878
version: "yarn build && git add action_text-trix",
7979
prerelease: "yarn version && yarn test",
8080
"release-npm": "npm adduser && npm publish",

karma.conf.js

Lines changed: 0 additions & 134 deletions
This file was deleted.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,15 @@
3434
"@rollup/plugin-json": "^4.1.0",
3535
"@rollup/plugin-node-resolve": "^13.3.0",
3636
"@web/dev-server": "^0.1.34",
37+
"@web/test-runner": "^0.20.2",
38+
"@web/test-runner-playwright": "^0.11.1",
39+
"@web/test-runner-webdriver": "^0.9.0",
3740
"babel-eslint": "^10.1.0",
3841
"chokidar": "^4.0.2",
3942
"concurrently": "^7.4.0",
4043
"eslint": "^7.32.0",
4144
"esm": "^3.2.25",
4245
"idiomorph": "^0.7.3",
43-
"karma": "6.4.1",
44-
"karma-chrome-launcher": "3.2.0",
45-
"karma-qunit": "^4.1.2",
46-
"karma-sauce-launcher": "^4.3.6",
4746
"qunit": "2.19.1",
4847
"rangy": "^1.3.0",
4948
"rollup": "^2.56.3",
@@ -65,7 +64,8 @@
6564
"watch": "rollup -c -w",
6665
"lint": "eslint .",
6766
"pretest": "yarn run lint && yarn run build",
68-
"test": "karma start",
67+
"test": "web-test-runner",
68+
"test:watch": "web-test-runner --watch",
6969
"version": "yarn build && git add action_text-trix",
7070
"prerelease": "yarn version && yarn test",
7171
"release-npm": "npm adduser && npm publish",

0 commit comments

Comments
 (0)