setup-tests

Detect the project stack and scaffold Vitest or Jest test suites.

Updated Apr 30, 2026
One-click install
npx skills add https://github.com/jnlanahan/Product-Agents-and-Skills --skill setup-tests
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: setup-tests
Source: https://github.com/jnlanahan/Product-Agents-and-Skills/tree/main/skills/4-Build-Tests
Command: npx skills add https://github.com/jnlanahan/Product-Agents-and-Skills --skill setup-tests

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill removes the guesswork and friction of adding tests to a project by scaffolding a working test framework and producing an initial set of passing unit and integration tests.

Core Features & Use Cases

  • Test framework detection: Identifies the project stack and whether a Jest/Vitest/Mocha setup already exists, then chooses an appropriate testing approach.
  • First-suite scaffolding: Creates or extends configuration, setup utilities, and test file structure for the detected environment (e.g., Next.js/Vite vs Express/Node).
  • Reliable coverage from day one: Ensures the first meaningful suite passes on a clean install, includes multiple real assertions, and avoids flaky setup tests.

Quick Start

Ask the AI to set up tests for your project, scaffold Vitest or Jest as appropriate, and write the first passing unit and integration tests.

Frequently Asked Questions about setup-tests

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

FAQPage Schema
How do I set up unit tests for a Next.js or Vite project?

To set up unit tests for a Next.js or Vite project, this approach detects your stack and scaffolds Vitest with Testing Library, generating configuration files and at least three passing tests.

What is the best way to add integration tests to an Express API?

The best way to add integration tests to an Express API is by scaffolding Jest and Supertest. This configures the test runner automatically and writes reliable, non-flaky integration tests for your Node endpoints.

Can I add a test suite to a repository without installing conflicting frameworks?

Yes, you can add a test suite without installing conflicting frameworks. The system detects existing test patterns and extends the current setup rather than reinstalling redundant runners like Jest or Vitest.

How do I scaffold my first passing test suite?

To scaffold your first passing test suite, the system evaluates your project stack, generates the appropriate Vitest or Jest configuration, and writes at least three meaningful unit and integration tests with real assertions.

Does test scaffolding work for projects with minimal test coverage?

Yes, test scaffolding works for projects with minimal coverage. It identifies whether a Jest, Vitest, or Mocha setup exists, then extends the structure by adding clean config and reliable passing tests from day one.