hoangnguyen0403/angular-testing
Write Angular component tests using TestBed, ComponentHarness, and HttpTestingController with proper signal input handling. Use when writing component tests, mocking HTTP calls, or testing signal inputs.
npx skills add https://github.com/HoangNguyen0403/agent-skills-standard --skill angular-testing
ComponentHarness (e.g., MatButtonHarness) not CSS selectors — stable across DOM changes.loader.getHarness(MatButtonHarness) + await button.click(). Never query by CSS class.See harness pattern for ComponentHarness examples.
provideHttpClientTesting() not manual HttpClient mocks.expectOne, .flush(mockData), verify() in afterEach.See harness pattern for HttpTestingController examples.
fixture.componentRef.setInput('name', value) — not direct assignment.fixture.detectChanges() after setInput().fakeAsync needed for most signal-driven tests.@angular/build:unit-test — faster, native ESM, no Karma. Configure in angular.json.TestBed.configureTestingModule({ imports: [StandaloneComponent] }).ComponentHarness, not CSS class strings.provideHttpClientTesting() + HttpTestingController.fixture.componentRef.setInput() for signal inputs.When this skill applies, preserve the following domain terminology or equivalent concrete examples in the answer when relevant:
Take hoangnguyen0403/angular-testing from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.