testing

Write Jest unit and integration tests for Angular components with mocking and coverage.

Updated Nov 18, 2025
One-click install
npx skills add https://github.com/twhitehead-blackdog/People --skill testing-twhitehead-blackdog
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing
Source: https://github.com/twhitehead-blackdog/People/tree/main/.agent/skills/testing
Command: npx skills add https://github.com/twhitehead-blackdog/People --skill testing-twhitehead-blackdog

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides guidance and examples for writing effective unit and integration tests for the People project, ensuring code quality and stability.

Core Features & Use Cases

  • Jest Configuration: Understand the project's Jest setup and coverage requirements.
  • Test Structure: Learn the standard structure for Angular component tests.
  • Mocking: Implement effective mocking strategies for services and HTTP requests.
  • Signal Testing: Write tests for Angular Signals and computed values.
  • Form Testing: Validate and test form submissions.

Quick Start

Use the testing skill to write a new unit test for the employee creation component.

Frequently Asked Questions about testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write Angular component unit tests using Jest?

You can structure Angular component tests using Jest by setting up the test bed, mocking required services, and validating form submissions to ensure robust component behavior and code stability.

How do I mock HTTP requests and services in Jest tests?

Implement effective mocking strategies for Angular services and HTTP requests in Jest by using test doubles and spies to isolate components and verify expected interactions during unit tests.

What is the required code coverage percentage for unit tests in this project?

The project requires 80% code coverage for branches, functions, lines, and statements, ensuring that your Jest unit and integration tests thoroughly validate the application logic.

How do I test Angular Signals and computed values?

You can write tests for Angular Signals and computed values by updating signal states within your Jest test suite and asserting that the computed values reflect those changes accurately.

What is the best way to test form submissions in Angular?

Validate form submissions in Angular tests by simulating user input, triggering the submit action, and asserting that form validations pass and expected service interactions occur successfully.