Skip to content

Commit 7750ad6

Browse files
Copilotdgreif
andcommitted
Convert from Karma/Chai/Mocha to Vitest with Playwright
- Removed karma, chai, mocha, chromium dependencies - Installed vitest@^3.2.4, @vitest/browser, and playwright - Created vitest.config.js with browser mode using chromium headless - Updated test file to use vitest imports and assertions - Renamed test.js to test.spec.js for vitest discovery - Removed karma.config.js and pretest build script - Updated package.json test script to use vitest - Updated .eslintrc.json to remove mocha environment and globals - Updated GitHub workflows to use Node 24 by default with Node 22 matrix - Added playwright install chromium step to CI workflows Co-authored-by: dgreif <[email protected]>
1 parent 98b9140 commit 7750ad6

File tree

7 files changed

+3163
-4356
lines changed

7 files changed

+3163
-4356
lines changed

.eslintrc.json

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,10 @@
2020
"github/unescaped-html-literal": "off",
2121
"import/no-unresolved": "off",
2222
"import/extensions": "off",
23+
"import/named": "off",
2324
"eslint-comments/no-use": "off",
24-
"github/no-inner-html": "off"
25-
},
26-
"env": {
27-
"mocha": true
28-
},
29-
"globals": {
30-
"assert": true,
31-
"remoteForm": true
25+
"github/no-inner-html": "off",
26+
"i18n-text/no-en": "off"
3227
}
3328
}
3429
]

.github/workflows/nodejs.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@ permissions:
77
jobs:
88
build:
99
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
node-version: [22, 24]
1013
steps:
1114
- uses: actions/checkout@v4
12-
- name: Use Node.js
15+
- name: Use Node.js ${{ matrix.node-version }}
1316
uses: actions/setup-node@v4
1417
with:
15-
node-version: 22
18+
node-version: ${{ matrix.node-version }}
1619
cache: 'npm'
1720
- run: npm install
21+
- run: npx playwright install chromium
1822
- run: npm run build --if-present
1923
- run: npm test
2024
env:

.github/workflows/publish.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ jobs:
1515
- uses: actions/checkout@v4
1616
- uses: actions/setup-node@v4
1717
with:
18-
node-version: 22
18+
node-version: 24
1919
registry-url: https://registry.npmjs.org/
2020
cache: npm
2121
- run: npm ci
22+
- run: npx playwright install chromium
2223
- run: npm test
2324
- run: npm version ${TAG_NAME} --git-tag-version=false
2425
env:

0 commit comments

Comments
 (0)