create-test

Generate or update Angular component unit tests in .spec.ts files.

294|147|Updated May 27, 2018
One-click install
npx skills add https://github.com/SAP/fundamental-ngx --skill create-test-sap
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-test
Source: https://github.com/SAP/fundamental-ngx/tree/main/.claude/skills/create-test
Command: npx skills add https://github.com/SAP/fundamental-ngx --skill create-test-sap

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generate or update unit tests for a component following project testing conventions.

Core Features & Use Cases

  • Automates creation of missing tests and updates existing specs to align with project conventions.
  • Ensures consistent test structure (describe blocks, it blocks, imports, and AAA pattern) across components.
  • Use case: When a component is added or modified, this skill creates or updates the associated .spec.ts to maintain test coverage and quality.

Quick Start

Provide the component path to generate or update tests for, and the tool will produce or modify the corresponding spec file.

Frequently Asked Questions about create-test

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

FAQPage Schema
How do I auto-generate Angular component unit tests for missing spec files?

Yes, you can update existing Angular component tests by providing the component path. The tool detects existing .spec.ts files and augments them to align with project testing conventions, ensuring proper imports, input/output coverage, and consistent AAA structure.

How does convention-aware test generation work for Angular .spec.ts files?

You need an Angular project with established testing conventions and a target component path. The tool reads your project's existing patterns to generate or augment .spec.ts files, ensuring the new tests blend seamlessly with your current testing setup.

What is the best way to ensure consistent test structure across Angular components?

Yes, this test generation approach works for incomplete or outdated Angular test coverage. It identifies missing or outdated .spec.ts files and updates them to ensure complete input/output coverage and adherence to your project's established testing patterns.

Are there limitations when updating existing Angular component tests automatically?

A limitation when updating existing Angular tests is that the tool expects established project testing conventions to follow. If your existing .spec.ts files lack clear patterns, the generated or augmented tests may not perfectly match your desired manual testing structure.