test: migrate from Karma and Jasmine to Vitest

Karma is deprecated and depends on braces, which has no patched release for GHSA-vfj7-8cjw-p6xm. Tests now run through the @angular/build unit-test builder with Vitest and jsdom. fakeAsync is replaced by Vitest fake timers, and zone.js is dropped because the zoneless app only loaded it for the Karma test polyfills.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
fraujulianandClaude Opus 5.5 committed 2026-10-06 20:44:40 +02:00
1 parent 81613d701a
commit ca1cf8aefe
7 files changed
+763 -1886

No files matched your search

+3 -19
View File
@@ -126,27 +126,11 @@
"builder": "@angular/build:extract-i18n"
},
"test": {
"builder": "@angular/build:karma",
"builder": "@angular/build:unit-test",
"options": {
"watch": false,
"browsers": "ChromeHeadless",
"polyfills": ["zone.js", "zone.js/testing"],
"buildTarget": "::development",
"tsConfig": "tsconfig.spec.json",
"inlineStyleLanguage": "scss",
"assets": [
{
"glob": "**/*",
"input": "src/assets/optimized",
"output": "assets/optimized"
},
{
"glob": "**/*",
"input": "public",
"output": "public"
}
],
"styles": ["src/styles.scss"],
"scripts": []
"watch": false
}
}
}