Agent skill
vitest-testing
Project-specific testing patterns using Vitest with Angular TestBed. Activates when writing tests, discussing test setup, creating spec files, mocking dependencies, or running tests.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/vitest-testing-danielsogl-copilot-workflow-dem
SKILL.md
Vitest Testing (Project-Specific)
For complete testing patterns, read .github/instructions/angular-testing.instructions.md.
For NgRx store testing, read .github/instructions/ngrx-signals-testing.instructions.md.
Quick Reference
npm test # Run all unit tests
npm test -- --watch # Watch mode
Mandatory Rules
provideZonelessChangeDetection()in every test setup- Vitest globals pre-configured — never import
describe,it,expect,vi - Signal inputs set via
componentRef.setInput('name', value) - AAA pattern — Arrange, Act, Assert
- No
any— properly type all mocks
Reference Tests
- Component:
src/app/features/tasks/ui/task-card/task-card.spec.ts - Service:
src/app/features/tasks/data/infrastructure/task-api.spec.ts - Store:
src/app/features/tasks/data/state/task-store.spec.ts
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?