Testing Strategy
Unit tests run through the Angular CLI test runner backed by Vitest
(@angular/build:unit-test), with jsdom as the DOM environment. describe / it / expect are
Vitest globals.
Running tests
npm test # ng test -> Vitest
npx vitest run src/app/path/to/file.spec.ts # a single spec file
npx vitest -t "test name" # a single test by name
Conventions
-
Test files live next to the code they cover (
*.spec.ts). -
The strict TypeScript config (
strict,strictTemplates) applies to test code too. -
src/app/app.spec.tsis the default Angular scaffold; its "render title" assertion is stale and is not a behavioural contract — do not treat it as one.
Linting and formatting
There is no configured ESLint setup in this repository. Formatting is Prettier (config in
package.json: 100 columns, single quotes; Angular parser for HTML).