angular-testing
Installation
SKILL.md
Testing
Priority: P1 (HIGH)
Core Philosophy
- Coverage is diagnostic and project-configured; verify risk-weighted critical paths rather than padding code for an arbitrary percentage.
Core Rule Anchors
[WEB-TEST-01]Tripartite Naming & AAA Cadence: Test names must followMethod_Scenario_ExpectedBehaviorand adhere strictly to Arrange-Act-Assert.[WEB-TEST-02]Accessible Harnesses & User Actions: Query UI components viaComponentHarness(e.g.MatButtonHarness) or accessible queries; strictly ban raw CSS class selectors or arbitrary DOM traversal.[WEB-TEST-03]Ban on Component Private State & Property Inspection: Never inspect component private state or internal properties directly. Assert on visible DOM state, output events, or harness query outcomes.[WEB-TEST-04]HTTP Boundary Mocking: Intercept HTTP requests at the boundary usingprovideHttpClientTesting()+HttpTestingControllerrather than mocking internal services or methods. Tests must verify true component data flow.[WEB-TEST-05]Bug-First Regression Lock: Every PR resolving a bug ticket or with titlefix(...)must introduce a test reproducing the defect prior to the fix.