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.json test target uses @angular/build:unit-test (runner defaults to vitest), or
  • a vitest.config.* exists, and
  • vitest is in devDependencies.

None present → stop and report; do not scaffold a runner unprompted.

Installs
5
GitHub Stars
13
First Seen
Sep 6, 2026