Agent skill

Testing

Standards for Component Test Harnesses and TestBed.

Stars 163
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/testing-hoangnguyen0403-agent-skills-standar-8

Metadata

Additional technical details for this skill

labels
angular testing harness testbed
triggers
{
    "files": [
        "**/*.spec.ts"
    ],
    "keywords": [
        "TestBed",
        "ComponentFixture",
        "TestHarness",
        "provideHttpClientTesting"
    ]
}

SKILL.md

Testing

Priority: P1 (HIGH)

Principles

  • Harnesses: Always use ComponentTestHarness (Angular Material Harnesses) to interact with components. Avoid querying DOM/CSS selectors directly.
  • Provider Mocks: Use provideHttpClientTesting() instead of mocking HttpClient manually.
  • Signal Testing: Signals update synchronously. No need for fakeAsync usually.

Guidelines

  • Avoid logic: Tests should just assert inputs and outputs.
  • Spectator: Consider using libraries like @ngneat/spectator for cleaner boilerplate if allowed.

References

  • Harness Pattern

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results