angular-testing

Write unit and integration tests for Angular v20+ apps with Vitest or Jasmine.

Updated Apr 17, 2026
One-click install
npx skills add https://github.com/Manu343726/audible-exporter --skill angular-testing-manu343726
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: angular-testing
Source: https://github.com/Manu343726/audible-exporter/tree/main/.agents/skills/angular-testing
Command: npx skills add https://github.com/Manu343726/audible-exporter --skill angular-testing-manu343726

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Writing and maintaining trustworthy automated tests for Angular v20+ apps becomes slow and error-prone, especially when components use signals, standalone patterns, OnPush change detection, and modern HTTP flows.

Core Features & Use Cases

  • Unit and integration testing for Angular v20+: Validate standalone components and their signal-driven behavior using TestBed.
  • Signal-focused test strategies: Test computed/effect behavior by driving signals directly and asserting derived outputs.
  • Modern Angular testing support: Cover OnPush components, input/output signal patterns, async timing (fakeAsync/tick/flush), and HTTP interactions via HttpTestingController.
  • Mocking and dependency isolation: Replace services with Vitest mocks and verify calls, signal updates, and UI outcomes deterministically.
  • Use case: You have a signal-based dashboard component that fetches user data and derives computed views; use this skill to write focused unit tests that verify state transitions, DOM rendering, and HTTP request/response handling.

Quick Start

Use the angular-testing skill to generate Vitest-based unit and integration tests for your Angular v20+ signal-driven components by following the provided setup and example patterns.

Frequently Asked Questions about angular-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I unit test Angular signal-based components with Vitest?

You can unit test Angular signal-based components with Vitest by using Angular TestBed to drive signals directly and assert derived outputs from computed and effect behaviors. This approach validates state transitions and DOM rendering deterministically.

Does Angular v20 support native Vitest for unit testing?

Yes, Angular v20 supports native Vitest testing through the @angular/build:unit-test runner. This allows you to configure TestBed for standalone components without needing Karma or Jasmine as a dependency.

What is the best way to mock HTTP interactions in Angular Vitest tests?

The best way to mock HTTP interactions in Angular Vitest tests is using HttpTestingController. It provides deterministic verification of HTTP requests and responses, ensuring your service mocking and HTTP flows are validated accurately.

How do I test OnPush change detection in Angular components?

You test OnPush change detection in Angular components by configuring TestBed to handle standalone patterns and signal updates. This ensures your tests properly trigger and verify the component's rendering behavior during async timing operations.

Can I test computed signals and effects in Angular without Jasmine?

Yes, you can test computed signals and effects without Jasmine by using Vitest. The skill provides modern mocking patterns that let you replace services with Vitest mocks and verify signal updates and UI outcomes directly.

Why exclude Cypress or Playwright when setting up Angular unit tests?

Cypress and Playwright are excluded because they are E2E tooling, whereas this approach targets unit and integration testing. Using Vitest with TestBed provides isolated, fast-running tests for signal-driven components rather than full browser automation.