ng-testing
Installation
SKILL.md
Angular Testing (Vitest)
Fast, deterministic unit and component tests through TestBed on a zoneless app. Assert
public behavior – signal outputs, rendered DOM, emitted outputs – never private fields. This is
the how-to for in-process tests; browser end-to-end work belongs to
create-e2e-tests. Before writing or editing any .spec.ts, read
style-guide/style-guide.spec.md – its Must/Should/Don't
rules win over anything here.
1. Detect the setup – gate before writing
Per AGENTS.md: if no Vitest setup is found, do not write or modify .spec.ts files. Confirm at
least one of:
angular.jsontesttarget uses@angular/build:unit-test(runner defaults tovitest), or- a
vitest.config.*exists, and vitestis indevDependencies.
None present → stop and report; do not scaffold a runner unprompted.