Writes or reviews Angular unit tests in Jest projects, with narrow typed mocks, deterministic async behavior, and assertions that catch regressions. Guides TestBed usage, mocking strategy, and RxJS timing.
Ships in ngautopilot-angular. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use this skill to design or review Angular unit tests when the project uses Jest.
Jest should support clear, maintainable tests for components, services, pipes, and helpers. The focus is not on forcing a testing style, but on keeping tests readable, deterministic, and aligned with the application's architecture.
The core rule is simple:
Test behavior at the boundary you own.
Use this skill when:
Use TestBed for Angular-aware component and service tests:
beforeEach(() => {
TestBed.configureTestingModule({
providers: [MyService],
});
});
Keep mocks narrow and intentional.
Assert behavior, not implementation details.
Prefer focused test names that describe user or service intent.
Use TestBed when injection, templates, or Angular lifecycle behavior is part of the contract. For a pure function or a class with explicit constructor dependencies, direct construction can keep the test smaller; do not cast a partial mock to a full service to bypass its type contract.
For timed RxJS flows, choose one clock owner: Jest fake timers or RxJS TestScheduler. Do not combine either with Angular fakeAsync in the same test. Subscribe before sending input, recreate mocks per test, and release subscriptions and restore timers in afterEach so a failing assertion cannot contaminate later tests.
Assert the time boundary and debounce reset, normalized arguments, duplicate suppression, obsolete response rejection, and error recovery. After a fallback emission, send a successful request through the same subscription; a single error assertion cannot prove the stream stayed usable.
For a search using debounceTime and switchMap, read the search contract example. It distinguishes delayed cancellation from immediate invalidation and includes teardown assertions, not just output checks.
Avoid rewriting the entire test stack during a local fix.
Avoid snapshot-only testing for dynamic Angular behavior.
Avoid overspecifying internal method calls when DOM or service behavior is the real contract.
Avoid mixing unrelated framework migrations into the testing work.
Do not replace time-boundary assertions with runAllTimers(), or treat a mocked Subject as proof that the real HTTP transport aborts a request. Verify transport cancellation separately when that is a requirement.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/ngautopilot-angular:angular--testing--jest-angular-unit-testingfrom ngautopilot-angular
npx claudepluginhub janpereira-dev/ngautopilot --plugin ngautopilot-angular350 skills in this plugin
/angular--ai--angular-v22-agent-skills-integrationAngular v22 Agent Skills IntegrationUse official Angular Agent Skills as reference material without copying them blindly or replacing NgAutoPilot routing. For Angular 22 projects and 21-to-22 upgrade planning.
/angular--ai--angular-v22-ai-tutor-safe-usageAngular v22 AI Tutor Safe UsageUse AI tutor workflows to teach Angular concepts without allowing unsafe code or secret exposure. For Angular 22 projects and 21-to-22 upgrade planning.
/angular--ai--angular-v22-angular-mcp-agent-workflowAngular v22 Angular MCP Agent WorkflowReview the workspace boundary, permissions, and runtime evidence of an Angular MCP integration. For Angular 22 projects and 21-to-22 upgrade planning.
Other plugins' skills for the same job