Skip to content

Commit df48a90

Browse files
Copilotdgreif
andcommitted
Migrate from Karma/Chai/Mocha to Vitest with Playwright browser mode
Co-authored-by: dgreif <[email protected]>
1 parent c9db99c commit df48a90

File tree

10 files changed

+1837
-2395
lines changed

10 files changed

+1837
-2395
lines changed

.github/workflows/nodejs.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@ permissions:
55
jobs:
66
build:
77
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
node-version: [22, 24]
811
steps:
912
- uses: actions/checkout@v4
10-
- name: Use Node.js
13+
- name: Use Node.js ${{ matrix.node-version }}
1114
uses: actions/setup-node@v4
1215
with:
13-
node-version: 22
16+
node-version: ${{ matrix.node-version }}
1417
cache: npm
1518
- run: npm install
1619
- run: npm run build

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ 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

install-browsers.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
# Install Playwright browsers for testing
3+
# This downloads the browsers to ~/.cache/ms-playwright/
4+
5+
set -e
6+
7+
echo "Installing Playwright browsers..."
8+
9+
# Download chromium
10+
wget -q --show-progress -O /tmp/chromium.zip "https://cdn.playwright.dev/dbazure/download/playwright/builds/chromium/1194/chromium-linux.zip"
11+
mkdir -p ~/.cache/ms-playwright/chromium-1194
12+
unzip -q /tmp/chromium.zip -d ~/.cache/ms-playwright/chromium-1194
13+
rm /tmp/chromium.zip
14+
15+
# Download chromium headless shell
16+
wget -q --show-progress -O /tmp/chromium-headless-shell.zip "https://cdn.playwright.dev/dbazure/download/playwright/builds/chromium/1194/chromium-headless-shell-linux.zip"
17+
mkdir -p ~/.cache/ms-playwright/chromium_headless_shell-1194
18+
unzip -q /tmp/chromium-headless-shell.zip -d ~/.cache/ms-playwright/chromium_headless_shell-1194
19+
rm /tmp/chromium-headless-shell.zip
20+
21+
echo "Playwright browsers installed successfully!"

karma.config.cjs

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

0 commit comments

Comments
 (0)