component-test-writer

Generate component-level unit tests for Vitest or Jest from source files.

1|Updated Apr 12, 2026
One-click install
npx skills add https://github.com/mytechsonamy/VibeFlow --skill component-test-writer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: component-test-writer
Source: https://github.com/mytechsonamy/VibeFlow/tree/main/skills/component-test-writer
Command: npx skills add https://github.com/mytechsonamy/VibeFlow --skill component-test-writer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Generates component-level unit tests from source files and, optionally, a scenario-set to map scenarios to test cases, while avoiding overwriting existing tests and aligning with the project’s testing strategy.

Core Features & Use Cases

  • Framework-aware test generation for Vitest or Jest using repo fingerprints; detects the correct framework without guessing.
  • Enforces a strict Arrange-Act-Assert structure in every generated test and preserves every scenario as a separate test case.
  • Supports on-demand invocation and PIPELINE-1 step integration, coordinating with test-strategy planning and contract/test-writer workflows.

Quick Start

Invoke /vibeflow:component-test-writer <path-or-glob> to generate tests for the specified source files.

Frequently Asked Questions about component-test-writer

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

FAQPage Schema
How do I generate unit tests for Vitest or Jest without manually configuring the framework?

Generate unit tests by pointing the tool at your source files; it uses the repository fingerprint to detect whether Vitest or Jest is configured and produces framework-aligned test code automatically.

How do I generate component tests that map directly to my test scenarios?

Provide a scenario-set.md file alongside your source files; the generator maps each scenario to a separate test case, preserving every scenario as an explicit Arrange-Act-Assert structured test.

Can I generate unit tests without overwriting my existing test files?

Yes, the component test generator explicitly avoids overwriting existing tests, reading your current test suite and only adding new test cases while logging all decisions to a run log for traceability.

What is the best way to enforce Arrange-Act-Assert structure in automated unit test generation?

Use a test generation tool that enforces an explicit Arrange-Act-Assert structure per test case, ensuring deterministic results and strict separation of test setup, execution, and assertion phases.

Do I need a scenario-set file to generate component-level unit tests?

A scenario-set is required to map scenarios to test cases, but the tool reads scenario-set.md when present and can still generate component tests from source files while aligning with your testing strategy.

Why do my generated unit tests need a run log for traceability?

A run log provides traceability by recording the test generation decisions, including framework detection via repository fingerprints and scenario-to-test-case mapping, ensuring deterministic and auditable test outputs.