angular-testing

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

Updated Mar 1, 2026
One-click install
npx skills add https://github.com/TheSpiciestDev/com-userevals --skill angular-testing-thespiciestdev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: angular-testing
Source: https://github.com/TheSpiciestDev/com-userevals/tree/main/.agents/skills/angular-testing
Command: npx skills add https://github.com/TheSpiciestDev/com-userevals --skill angular-testing-thespiciestdev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and scripts (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 frameworks for fast and efficient testing.
  • Signal-Based Components: Provides clear examples for testing components utilizing Angular Signals.
  • Dependency Mocking: Demonstrates effective techniques for mocking services and dependencies.
  • Use Case: You've built a new Angular component and need to ensure it functions correctly under various conditions, including asynchronous operations and user interactions. This Skill guides you through creating comprehensive tests.

Quick Start

Write unit tests for your Angular components using Vitest and TestBed.

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 components that use signals?

Testing Angular components with signals requires specific strategies to handle reactivity. This Skill provides clear examples for testing signal-based components, ensuring your signal updates trigger the expected DOM changes during unit tests.

How do I mock dependencies when testing Angular services with inject()?

Mocking dependencies for Angular services using inject() involves configuring TestBed providers. This Skill demonstrates effective dependency mocking techniques to isolate services and validate HTTP interactions during integration testing.

Does Vitest work well with OnPush change detection in Angular?

Vitest works with OnPush change detection by utilizing TestBed to trigger updates. This Skill covers testing OnPush components, showing you how to manage change detection cycles correctly within your Vitest test suite.

What is the best way to set up a unit testing environment for Angular using Vitest?

Setting up a unit testing environment for Angular using Vitest involves configuring the framework to work with TestBed. This Skill includes setup instructions and basic examples to help you start writing robust tests quickly.

How do I test inputs and outputs in Angular integration tests?

Testing inputs and outputs in Angular integration tests involves binding values and listening to events within the component template. This Skill guides you through input/output testing and testing async operations effectively.