build(test): run unit tests with vitest and jsdom

Karma needed headless Chrome. Vitest with jsdom runs with no browser.
Lighthouse CI now gets Chrome from @puppeteer/browsers.
Two CSS font tests are dropped: jsdom does not apply real CSS.
This commit is contained in:
lobo committed 2026-10-13 09:02:45 +02:00
1 parent dd7c9f6e3d
commit 4e59770e53
14 files changed
+751 -1865

No files matched your search

+2 -2
View File
@@ -87,7 +87,7 @@ Then open http://localhost:8080
| `npm start` | Dev server |
| `npm run build` | Production build |
| `npm run watch` | Rebuild on change (development configuration) |
| `npm test` | Unit tests (Karma + Jasmine, headless Chrome) |
| `npm test` | Unit tests (Vitest + jsdom, no browser needed) |
| `npm run lint` | ESLint over `src/**/*.ts` and `src/**/*.html` |
| `npm run i18n:check` | Verifies `en.json` and `de.json` share the exact same keys |
@@ -104,7 +104,7 @@ Triggered on every push to `main` and on pull requests targeting `main`.
1. Lint & type check — `npm run lint`
2. i18n key sync — `npm run i18n:check`
3. Unit tests — `npx ng test --watch=false`
3. Unit tests — `npm test`
4. Production build — `npx ng build --configuration production`
5. Lighthouse audit — `npx lhci autorun` (performance & SEO)