The Angular unit tests run on Angular's Vitest runner instead of Karma, and the jasmine-core pin is gone #213

Open
opened 2026-10-31 12:42:27 -04:00 by claude · 0 comments
Owner
  • Draft: BUG-31
  • Priority: low (Karma is deprecated; the pin blocks jasmine-core 6/7 updates)
  • Agent: console-coder
  • Depends on: #212 (avoid touching specs during the client migration)
  • Decisions: Q-BUG-2

Why

angular.json:71 uses @angular/build:karma. jasmine-core is pinned to ^5.13.0 (src/angular/package.json:51) because Karma loads jasmine-core 6+ as an ES module and prints a deprecation (B23-11, 67ee54c). The owner said on 2026-10-29: keep the pin until Karma is replaced.

What changes

  • Switch the test builder to Angular's Vitest runner and remove the karma packages, karma.conf.js and the jasmine-core pin.
  • Port Jasmine-only APIs (jasmine.createSpyObj, spyOn(...).and) to Vitest equivalents, or use a compatibility layer and say which. About 1,600 specs; split the port into several commits by feature folder if the diff is large.
  • Keep npm test -- --watch=false working headless in the CI node image (Chromium is at docker/ci.Dockerfile:60), or switch to the runner's default environment and say why.
  • Update AGENTS.md "Frontend", src/angular/README.md, CONTRIBUTING commands and the test command in every agent brief that names --browsers=ChromeHeadlessNoSandbox (src/agents/, then run the sync script).

Acceptance

  • Same number of specs, all passing, none skipped. npm run lint, format:check and build are clean.
  • CI Angular job is green. No karma package or jasmine-core pin remains.

Source

b23-design.md:437-439 (B23-11 note and owner 2026-10-29).
Owner decision 2026-10-31 (Q-BUG-2): "Angular Vitest".

- **Draft:** BUG-31 - **Priority:** low (Karma is deprecated; the pin blocks jasmine-core 6/7 updates) - **Agent:** console-coder - **Depends on:** #212 (avoid touching specs during the client migration) - **Decisions:** Q-BUG-2 ### Why `angular.json:71` uses `@angular/build:karma`. `jasmine-core` is pinned to `^5.13.0` (`src/angular/package.json:51`) because Karma loads jasmine-core 6+ as an ES module and prints a deprecation (B23-11, `67ee54c`). The owner said on 2026-10-29: keep the pin until Karma is replaced. ### What changes - Switch the test builder to Angular's Vitest runner and remove the karma packages, `karma.conf.js` and the jasmine-core pin. - Port Jasmine-only APIs (`jasmine.createSpyObj`, `spyOn(...).and`) to Vitest equivalents, or use a compatibility layer and say which. About 1,600 specs; split the port into several commits by feature folder if the diff is large. - Keep `npm test -- --watch=false` working headless in the CI node image (Chromium is at `docker/ci.Dockerfile:60`), or switch to the runner's default environment and say why. - Update AGENTS.md "Frontend", `src/angular/README.md`, CONTRIBUTING commands and the test command in every agent brief that names `--browsers=ChromeHeadlessNoSandbox` (`src/agents/`, then run the sync script). ### Acceptance - [ ] Same number of specs, all passing, none skipped. `npm run lint`, `format:check` and `build` are clean. - [ ] CI Angular job is green. No `karma` package or `jasmine-core` pin remains. ### Source `b23-design.md:437-439` (B23-11 note and owner 2026-10-29). Owner decision 2026-10-31 (Q-BUG-2): "Angular Vitest".
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
lantea-one/ninlil#213
No description provided.