Skip to content

Commit 2e200ec

Browse files
committed
chore: migrate unit tests from Karma/Jasmine to Vitest
Angular 21 made Vitest the stable, primary test runner. Switches the existing @angular/build:unit-test builder to the vitest runner, drops Karma/Jasmine tooling, and updates the demo app's spec file via the official refactor-jasmine-vitest codemod (with manual fixes for await-ordering bugs it introduced in a few async tests).
1 parent 13f850f commit 2e200ec

6 files changed

Lines changed: 1083 additions & 1688 deletions

File tree

angular.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
"newProjectRoot": "projects",
99
"schematics": {
1010
"@schematics/angular:application": {
11-
"testRunner": "karma"
11+
"testRunner": "vitest"
1212
},
1313
"@schematics/angular:library": {
14-
"testRunner": "karma"
14+
"testRunner": "vitest"
1515
}
1616
},
1717
"projects": {
@@ -79,10 +79,10 @@
7979
"test": {
8080
"builder": "@angular/build:unit-test",
8181
"options": {
82-
"runner": "karma",
83-
"runnerConfig": true,
82+
"runner": "vitest",
8483
"coverage": true,
85-
"coverageExclude": ["src/app/*-toast/**"]
84+
"coverageExclude": ["src/app/*-toast/**"],
85+
"coverageReporters": ["html", "text-summary", "lcovonly"]
8686
}
8787
},
8888
"lint": {

karma.conf.js

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

0 commit comments

Comments
 (0)