Testing

Generate and execute unit tests with Vitest/Jest and E2E tests with Playwright.

Updated Feb 12, 2026
One-click install
npx skills add https://github.com/nicanac/reforge --skill testing-nicanac
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Testing
Source: https://github.com/nicanac/reforge/tree/main/.ai/skills/testing
Command: npx skills add https://github.com/nicanac/reforge --skill testing-nicanac

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the process of creating and executing tests, ensuring code quality and adherence to project testing strategies.

Core Features & Use Cases

  • Test Generation: Provides examples and guidance for writing unit and E2E tests.
  • Testing Strategy Enforcement: Encourages co-location of tests, descriptive naming, and the Arrange-Act-Assert pattern.
  • Use Case: After developing a new user authentication feature, use this Skill to generate and run comprehensive unit and E2E tests to verify its functionality and security.

Quick Start

Generate unit tests for the calculateTotal function in utils.js.

Frequently Asked Questions about Testing

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

FAQPage Schema
How do I generate unit tests for a specific function using Vitest?

To generate unit tests with Vitest, target the specific function and apply the Arrange-Act-Assert pattern to verify business logic. This approach enforces descriptive naming and co-located test structures for comprehensive coverage.

What is the best way to structure end-to-end tests with Playwright?

Structuring end-to-end tests with Playwright involves defining user interaction scenarios and applying project testing strategies. This ensures test generation adheres to best practices for comprehensive coverage of API handlers and user flows.

Does this testing approach work with both Vitest and Jest?

Yes, this testing approach supports both Vitest and Jest for unit testing. It generates and executes software tests according to defined project strategies, enforcing structural best practices across your business logic.

How do I enforce the Arrange-Act-Assert pattern in my test suite?

To enforce the Arrange-Act-Assert pattern, generate tests that explicitly separate setup, action, and assertion phases. This strategy ensures descriptive naming and co-location while testing utilities and API handlers.

Can I automate test generation for API handlers and business logic?

Yes, you can automate test generation for API handlers and business logic. The process creates and executes tests based on defined project strategies, ensuring code quality and adherence to structural best practices.

Why should I co-locate tests with my source files?

Co-locating tests with source files streamlines the creation process and enforces project testing strategies. This practice ensures descriptive naming and improves maintainability across business logic and utility tests.