Task Summary
Land the Karma → Vitest runner switch and the bulk Jasmine → Vitest spec sweep Captured by PR #4862.
Scope (in this step)
- Replace the
test Architect builder: @angular-builders/custom-webpack:karma → @angular/build:unit-test with runner: vitest.
- Add
vitest@4.0.8 and @vitest/coverage-v8; remove karma, karma-chrome-launcher, karma-coverage, karma-jasmine, jasmine-core, @types/jasmine, @types/karma-coverage.
- New configs:
vitest.config.ts — globals: true so existing Jasmine-style specs use bare describe/it/expect
src/vitest-globals.d.ts — triple-slash reference for vitest/globals types (workaround for parent tsconfig's pinned typeRoots)
src/jsdom-svg-polyfill.ts — stub SVGSVGElement#createSVGMatrix etc. so jointjs can instantiate under jsdom
src/main.test.ts — minimal entry that keeps the test bundle from pulling AppModule → every component
src/tsconfig.test.json — relaxes strict template type-checking for the test build only
- Mechanical Jasmine → Vitest sweep over 73 spec files (~400 substitutions): matchers,
.and.* chain, jasmine.createSpy(Obj), jasmine.SpyObj<T> → Mocked<T>, spyOn → vi.spyOn, etc.
- CI: switch frontend test invocation
--code-coverage → --coverage --coverage-reporters=lcovonly. Codecov upload glob unchanged.
- Stub two empty specs (
workflow-executions.service.spec.ts, joint-ui.service.spec.ts) with it.todo placeholders so vitest discovery doesn't fail.
Result
Test Files 14 passed | 2 skipped (16)
Tests 109 passed | 2 todo (111)
Out of scope (other steps)
The other ~57 specs need follow-ups tracked in their own sub-issues:
- 43 component specs: NgModule → standalone migration
- 13 service specs reaching the auth.service → modal chain
drag-drop.service.spec.ts: needs Vitest browser mode
any type tightening across spec files
Task Summary
Land the Karma → Vitest runner switch and the bulk Jasmine → Vitest spec sweep Captured by PR #4862.
Scope (in this step)
testArchitect builder:@angular-builders/custom-webpack:karma→@angular/build:unit-testwithrunner: vitest.vitest@4.0.8and@vitest/coverage-v8; removekarma,karma-chrome-launcher,karma-coverage,karma-jasmine,jasmine-core,@types/jasmine,@types/karma-coverage.vitest.config.ts—globals: trueso existing Jasmine-style specs use baredescribe/it/expectsrc/vitest-globals.d.ts— triple-slash reference forvitest/globalstypes (workaround for parent tsconfig's pinnedtypeRoots)src/jsdom-svg-polyfill.ts— stubSVGSVGElement#createSVGMatrixetc. so jointjs can instantiate under jsdomsrc/main.test.ts— minimal entry that keeps the test bundle from pulling AppModule → every componentsrc/tsconfig.test.json— relaxes strict template type-checking for the test build only.and.*chain,jasmine.createSpy(Obj),jasmine.SpyObj<T>→Mocked<T>,spyOn→vi.spyOn, etc.--code-coverage→--coverage --coverage-reporters=lcovonly. Codecov upload glob unchanged.workflow-executions.service.spec.ts,joint-ui.service.spec.ts) withit.todoplaceholders so vitest discovery doesn't fail.Result
Out of scope (other steps)
The other ~57 specs need follow-ups tracked in their own sub-issues:
drag-drop.service.spec.ts: needs Vitest browser modeanytype tightening across spec files