angular-testing

Test Angular v21+ components, services, and HTTP interactions with Vitest or Jasmine.

4|Updated Jun 25, 2025
One-click install
npx skills add https://github.com/neogenz/pulpe --skill angular-testing-neogenz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: angular-testing
Source: https://github.com/neogenz/pulpe/tree/main/.agents/skills/angular-testing
Command: npx skills add https://github.com/neogenz/pulpe --skill angular-testing-neogenz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enables rapid testing of Angular v21+ applications by providing comprehensive guidelines and patterns for unit and integration tests, including signal-based components, OnPush change detection, and HTTP interactions.

Core Features & Use Cases

  • Vitest setup and usage for Angular v21+ projects, with guidance on configuring tests in a realistic company project.
  • Jasmine compatibility guidance for environments still using Jasmine and Karma.
  • Test patterns for signals, dependency injection, and HTTP client interactions, plus component harnesses and deterministic tests.
  • Use Case: Validate a Counter component that uses signals and OnPush change detection, or mock a HttpClient service to verify data flows without real network calls.

Quick Start

Install Vitest and set up a basic Angular test scaffold. Then run tests with a single command and iterate on test-driven development with signal-based components.

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 and OnPush change detection?

To test Angular components using signals and OnPush change detection, you apply specific test patterns that validate signal updates and trigger change detection manually. This ensures deterministic tests for modern reactive component architectures.

Can I use Vitest for Angular v21+ testing instead of Jasmine?

Yes, you can use Vitest for Angular v21+ testing instead of Jasmine. This approach provides setup guidelines for Vitest in realistic company projects while maintaining Jasmine compatibility for environments still using Karma.

What is the best way to mock HttpClient dependencies in Angular unit tests?

The best way to mock HttpClient dependencies in Angular unit tests is using provided HTTP testing patterns to verify data flows without real network calls. This method enables rapid validation of complex service interactions and API responses.

How do I write integration tests for Angular services using the inject function?

You write integration tests for Angular services using the inject function by applying modern dependency injection mocking patterns. This validates service instantiation and interactions within the Angular testing framework.

Does this Angular testing approach support component harnesses for integration tests?

Yes, this Angular testing approach supports component harnesses for integration tests. It provides comprehensive guidelines for unit, integration, and HTTP tests to ensure deterministic testing of complex component interactions.