angular-testing

Write unit and integration tests for Angular components with Vitest or Jasmine.

Updated Mar 2, 2026
One-click install
npx skills add https://github.com/MassimilianoPili/claude-code-config --skill angular-testing-massimilianopili
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: angular-testing
Source: https://github.com/MassimilianoPili/claude-code-config/tree/main/skills/angular-testing
Command: npx skills add https://github.com/MassimilianoPili/claude-code-config --skill angular-testing-massimilianopili

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of writing robust unit and integration tests for Angular applications, ensuring code quality and maintainability.

Core Features & Use Cases

  • Vitest/Jasmine Integration: Write tests using either Vitest (recommended for modern Angular) or Jasmine.
  • Signal-Based Components: Test components leveraging Angular Signals and OnPush change detection.
  • Dependency Mocking: Effectively mock services, HTTP requests, and other dependencies.
  • Use Case: You've just built a new Angular component with complex logic and signal inputs. Use this Skill to generate comprehensive unit tests that cover its functionality, including edge cases and interactions with mocked services.

Quick Start

Generate unit tests for your Angular components using Vitest, covering signal-based components and mocked dependencies.

Frequently Asked Questions about angular-testing

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

FAQPage Schema
How do I write unit tests for Angular signal-based components using Vitest?

To mock HTTP requests in Angular integration tests, you use TestBed configurations to intercept and provide controlled responses for backend interactions. This ensures reliable integration tests by isolating service behavior and validating asynchronous operations.

Does Vitest work well with Angular TestBed configurations?

Testing OnPush change detection in Angular requires triggering change detection manually within TestBed to reflect signal updates. This ensures your tests accurately evaluate component rendering and state transitions under strict change detection rules.

What is the best way to mock services and HTTP requests in Angular integration tests?

To mock HTTP requests in Angular integration tests, you use TestBed configurations to intercept and provide controlled responses for backend interactions. This ensures reliable integration tests by isolating service behavior and validating asynchronous operations.

How do I test Angular component inputs, outputs, and forms?

Testing Angular component inputs, outputs, and forms involves using TestBed and component harnesses to simulate user interactions and verify data flow. This method accurately covers form validation and directive behaviors within your unit tests.

Can I use Jasmine instead of Vitest for modern Angular testing?

You can use Jasmine instead of Vitest for modern Angular testing, as both frameworks are supported for writing unit and integration tests. Jasmine provides a traditional approach while still enabling effective service mocking and router interaction testing.