angular-testing

Create unit and integration tests for Angular v20+ apps with Vitest or Jasmine.

1|Updated Jul 5, 2025
One-click install
npx skills add https://github.com/kevinchatham/tressi --skill angular-testing-kevinchatham
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: angular-testing
Source: https://github.com/kevinchatham/tressi/tree/main/.agents/skills/angular-testing
Command: npx skills add https://github.com/kevinchatham/tressi --skill angular-testing-kevinchatham

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Write unit and integration tests for Angular v20+ applications using Vitest or Jasmine, focusing on signals, OnPush change detection, services with inject(), and HTTP interactions. This guide helps teams set up robust testing patterns and workflows that cover common Angular testing scenarios and migrations.

Core Features & Use Cases

  • Vitest and Jasmine driven unit and integration testing patterns for Angular v20+ apps.
  • Coverage for components with signals, OnPush change detection, and injectable services.
  • Guidance for testing HTTP interactions and setting up test infrastructure, with references and migration notes.

Quick Start

Run Angular tests for a v20+ project using Vitest or Jasmine through your build tool to validate unit and integration coverage.

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

Angular testing for components with signals and OnPush change detection involves configuring TestBed and triggering change detection manually. This Skill provides patterns for testing these v20+ features robustly using Vitest or Jasmine.

What's the best way to migrate Angular tests from Jasmine to Vitest?

Migrating Angular tests from Jasmine to Vitest requires mapping Jasmine APIs to Vitest equivalents and updating test infrastructure. This Skill includes references in references/vitest-migration.md to guide teams through the transition.

Can I use Vitest to test Angular services with the inject() function?

Yes, you can use Vitest to test Angular services with the inject() function by leveraging TestBed.inject() within your test setup. This Skill covers mocking dependencies and setting up test infrastructure for injectable services.

How do I mock HTTP interactions in Angular integration tests?

To mock HTTP interactions in Angular integration tests, configure TestBed with HTTP testing controllers to intercept and verify requests. This Skill specifies patterns for testing HTTP interactions and setting up the necessary test infrastructure.

Does this Angular testing approach support both unit and integration tests?

Yes, this Angular testing approach supports both unit and integration tests by providing Vitest and Jasmine driven patterns for v20+ apps. It covers components, services with inject(), and HTTP interactions to ensure comprehensive coverage.