angular-testing

Generate unit and integration tests for Angular v20+ applications.

Updated Mar 22, 2026
One-click install
npx skills add https://github.com/shapris/svarus-darbas --skill angular-testing-shapris
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: angular-testing
Source: https://github.com/shapris/svarus-darbas/tree/main/.kilocode/skills/angular-testing
Command: npx skills add https://github.com/shapris/svarus-darbas --skill angular-testing-shapris

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Reduces the friction and uncertainty of writing reliable unit and integration tests for Angular v20+ applications by providing modern patterns for signal-based components, OnPush change detection, service testing, and HTTP interactions.

Core Features & Use Cases

  • Component Testing: Patterns for standalone and OnPush components including how to set inputs, trigger change detection, and assert DOM updates driven by signals.
  • Service and HTTP Testing: Guidance for injecting services, using HttpTestingController and provideHttpClientTesting for deterministic HTTP tests, and verifying no outstanding requests.
  • Vitest Migration & Advanced Patterns: Migration tips from Jasmine to Vitest, mocking strategies, fake timers, component harnesses, router and form testing, and coverage configurations for CI pipelines.
  • Use Case: Validate a signal-driven todo list component, mock its auth and API dependencies, verify filtered computed values, and assert template rendering under OnPush change detection.

Quick Start

Create a TestBed-based unit test for a standalone component using Vitest or Jasmine, set inputs via componentRef.setInput, call fixture.detectChanges, and assert the signal-driven DOM updates.

Frequently Asked Questions about angular-testing

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

FAQPage Schema
How do I test Angular signal-based components using TestBed and Vitest?

Migrate Angular unit tests from Jasmine to Vitest by configuring the Vitest or Angular unit-test builder, applying migration tips for component harnesses, mocking dependencies, and setting up coverage configurations for CI pipelines.

How do I test Angular HTTP interactions using HttpTestingController?

Test Angular HTTP interactions by injecting services with inject(), configuring provideHttpClientTesting, asserting requests via HttpTestingController, and verifying no outstanding HTTP requests remain.

Does this testing approach support standalone and OnPush components in Angular v20+?

Yes, this testing approach targets Angular v20+ standalone and OnPush components, providing patterns to trigger change detection, set inputs, and assert template rendering driven by signals.

What is the best way to mock dependencies and use fake timers in Angular unit tests?

The best way to mock dependencies and use fake timers in Angular unit tests involves applying modern patterns for service testing, mocking dependencies, and utilizing fake timers within a Vitest or Jasmine environment.