test-writer

Generate unit or integration tests for modified files from diffs.

Updated Oct 27, 2024
One-click install
npx skills add https://github.com/TimMoyence/Innov-mind-museum --skill test-writer-timmoyence
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-writer
Source: https://github.com/TimMoyence/Innov-mind-museum/tree/main/.claude/skills/test-writer
Command: npx skills add https://github.com/TimMoyence/Innov-mind-museum --skill test-writer-timmoyence

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the generation of tests for files modified in a codebase, helping maintain reliability as changes happen.

Core Features & Use Cases

  • Targeted test generation: analyzes modified files and produces suitable unit or integration tests following common project conventions.
  • TDD-aligned templates: uses descriptive test structures (describe/it) with concrete assertions to encourage meaningful coverage.
  • Use Case: when you modify backend or frontend modules, generate tests for the changed code to validate behavior quickly.

Quick Start

Run /test-writer with a path or "changed" to generate tests for modified files.

Frequently Asked Questions about test-writer

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

FAQPage Schema
How do I generate unit tests for changed code automatically?

To generate unit tests for changed code automatically, you can use a test generation tool that analyzes git diffs and produces tests based on file patterns and project conventions. This ensures tests compile, run, and improve coverage.

Can I generate integration tests from a git diff?

Yes, you can generate integration tests from a git diff by applying a test generation tool that analyzes modified files and produces integration tests according to project conventions. It enforces strict mocking and concrete assertions.

How does automated test generation handle TDD structure?

Automated test generation handles TDD structure by applying descriptive templates like describe/it with concrete assertions. This encourages meaningful coverage and validates behavior quickly for modified backend or frontend modules.

What is the best way to write tests for modified files in a project?

The best way to write tests for modified files is to analyze the codebase diffs and produce suitable unit or integration tests following common project conventions. This enforces strict mocking and ensures tests compile and run successfully.

Does test generation work for both backend and frontend changes?

Yes, test generation works for both backend and frontend changes by analyzing file patterns within the diffs. It produces suitable tests according to project-specific conventions to validate behavior quickly.

Why do generated tests need strict mocking and project conventions?

Generated tests need strict mocking and project conventions to ensure they compile, run, and improve coverage reliably. Enforcing these constraints maintains reliability as codebase changes happen.