angular-testing

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

5|1|Updated Jul 25, 2023
One-click install
npx skills add https://github.com/xocomil/fullstack-dinos --skill angular-testing-xocomil
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: angular-testing
Source: https://github.com/xocomil/fullstack-dinos/tree/main/.agent/skills/angular-testing
Command: npx skills add https://github.com/xocomil/fullstack-dinos --skill angular-testing-xocomil

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Angular projects often struggle with setting up and maintaining robust tests across unit, integration, and services, especially when using signals and OnPush change detection. This skill provides a comprehensive guide to testing Angular v21+ apps with Vitest or Jasmine, including direct signal testing, component tests, services, HTTP testing, and advanced patterns.

Core Features & Use Cases

  • Vitest-first setup for Angular projects with Vitest Angular adapter and configurations.
  • Examples for testing signals, OnPush components, services, HTTP resources, router, forms, directives, pipes, and harnesses.
  • Use cases include verifying component behavior, data flows with signals, and ensuring test infrastructure works with real-world interactivity.

Quick Start

Install the Vitest Angular tooling and run your first spec against a sample component.

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 signals and OnPush components effectively?

Testing Angular signals and OnPush components requires structured test patterns that directly verify signal state changes and component behavior. This skill provides examples for testing signals, OnPush change detection, and component interactions using modern tooling.

Can I use Vitest instead of Jasmine for Angular unit testing and integration testing?

Yes, you can use Vitest for Angular unit testing and integration testing. This skill provides a Vitest-first setup using the Vitest Angular adapter and configuration to test components, services, and HTTP calls across Angular v21+.

What is the best way to set up mocks and harnesses for Angular integration tests?

Setting up mocks and harnesses for Angular integration tests involves using well-structured patterns to verify real-world interactivity. This skill guides you through creating maintainable mocks and component harnesses for routing, forms, and HTTP scenarios.

Does this Angular testing approach support HTTP resources and routing scenarios?

Yes, this Angular testing approach supports HTTP resources and routing scenarios. It provides test patterns and configurations to reliably verify HTTP calls, router behavior, forms, directives, and pipes within your Angular v21+ applications.

How do I maintain scalable test suites for Angular v21+ apps?

Maintaining scalable test suites for Angular v21+ apps requires well-structured test patterns, mocks, and harnesses. This skill provides comprehensive guides for unit and integration testing to ensure your test infrastructure remains maintainable as your application grows.