test-generator

Generate Vitest-based unit, integration, and end-to-end test templates from TypeScript/React source files.

1|Updated Nov 13, 2024
One-click install
npx skills add https://github.com/vincent-kk/albatrion --skill test-generator-vincent-kk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-generator
Source: https://github.com/vincent-kk/albatrion/tree/main/.claude/skills/test-generator
Command: npx skills add https://github.com/vincent-kk/albatrion --skill test-generator-vincent-kk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Test Generator Skill designs comprehensive testing strategies and automatically scaffolds unit, integration, and end-to-end tests, accelerating software quality.

Core Features & Use Cases

  • Generates Vitest-based unit, integration, and E2E test templates from TypeScript/React source files.
  • Provides guidance on coverage goals, mocking strategies, and CI/CD integration.
  • Use case: when adding a new component, this skill outputs ready-to-edit test templates and a clear plan to achieve target coverage.

Quick Start

  • Identify the target source file (e.g., src/components/Button.tsx) and run the generator to produce test scaffolds under the conventional tests directory.
  • Review and customize the generated tests, then run them with your standard test runner (e.g., yarn test) and generate a coverage report.

Frequently Asked Questions about test-generator

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

FAQPage Schema
How do I automatically generate Vitest test scaffolds for a TypeScript React project?

To generate Vitest test scaffolds, run the test generator on a TypeScript React source file. It analyzes the code and outputs ready-to-edit unit, integration, and E2E test templates in your conventional tests directory.

What is the best way to build a comprehensive testing strategy and coverage plan for new components?

Building a comprehensive testing strategy involves analyzing source code to define coverage goals, mocking strategies, and CI/CD integration. This generator provides a clear plan and test templates to achieve your target coverage for new components.

Do I need to install special dependencies to generate tests for my existing TypeScript files?

No special installations are required to generate tests for TypeScript files. The generator relies on your standard project tooling, analyzing existing scripts to tailor Vitest-based templates without adding extra dependencies.

How does Storybook integration work when generating E2E and unit tests?

Storybook integration works by incorporating component stories into the generated testing strategy. The generator provides specific guidance on how to align your Vitest unit and E2E tests with your existing Storybook setup.

Can I use this test generation approach to create templates for CI/CD automation pipelines?

Yes, you can use this test generation approach for CI/CD automation. It produces Vitest-based test templates and provides explicit guidance on integrating those tests into your continuous integration workflows.