angular-testing

Tests Angular components and services using Vitest or Jasmine frameworks.

Updated Nov 20, 2025
One-click install
npx skills add https://github.com/bluehands/Carbon-Aware-Scheduler --skill angular-testing-bluehands
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: angular-testing
Source: https://github.com/bluehands/Carbon-Aware-Scheduler/tree/main/source/frontend/.agents/skills/angular-testing
Command: npx skills add https://github.com/bluehands/Carbon-Aware-Scheduler --skill angular-testing-bluehands

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: Supports modern testing with Vitest or traditional Jasmine.
  • Signal-Based Components: Effectively tests components utilizing Angular Signals.
  • Dependency Mocking: Provides clear patterns for mocking services and HTTP interactions.
  • Use Case: You've just built a new Angular component and need to write comprehensive tests for its functionality, including its interaction with services and its signal-based state management.

Quick Start

Write unit and integration tests for your Angular components and services using Vitest.

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?

To write unit tests for Angular signal-based components, you need to verify state changes and effects within your test setup. This Skill provides specific patterns for testing signal-based state management and component logic using Vitest or Jasmine.

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

Yes, you can use Vitest instead of Jasmine for Angular component testing. This approach supports modern testing frameworks like Vitest while maintaining compatibility with traditional Jasmine setups for writing unit and integration tests.

What's the best way to mock service dependencies and HTTP requests in Angular tests?

The best way to mock service dependencies and HTTP requests in Angular tests is using established mocking patterns. This Skill provides clear patterns for mocking services and HTTP interactions to isolate components during unit and integration testing.

How do I test Angular components with OnPush change detection?

To test Angular components with OnPush change detection, you must trigger change detection appropriately within your test cases. This Skill offers specific guidance on handling OnPush change detection scenarios alongside component harness testing.

Does this cover integration tests for Angular router and form validation?

Yes, this covers integration tests for Angular router and form validation. It includes advanced patterns for router testing, form validation, directive testing, and pipe testing to ensure comprehensive coverage of your application.