test-writer

Solid

Generate unit tests for existing code

AI & Automation 148 stars 60 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 82/100

Stars 20%
72
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
62
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Test Writer Generate comprehensive unit tests for the specified code. ## Instructions 1. Read the target file to understand its exports, functions, classes, and behavior. 2. Detect the project's test framework by checking package.json, config files, or existing test files (e.g., Jest, Mocha, Pytest, Go testing, JUnit). 3. Locate existing tests to match the project's conventions for file placement, naming, and import style. 4. Write tests covering: - **Happy paths**: Typical inputs producing expected outputs. - **Edge cases**: Empty inputs, boundary values, large inputs, special characters. - **Error handling**: Invalid inputs, thrown exceptions, rejected promises, error return values. - **State transitions**: Side effects, mutations, event emissions where applicable. 5. Use descriptive test names that state the expected behavior (e.g., "returns empty array when input is null"). 6. Mock external dependencies (network, filesystem, databases) rather than calling them. 7. Write the test file to the correct location following project conventions. 8. Run the tests and verify they all pass. If any fail, diagnose and fix the test before finishing. 9. Report a summary of how many tests were written and what they cover.

Details

Author
prapaa-ai
Repository
prapaa-ai/agav
Created
1 months ago
Last Updated
today
Language
TypeScript
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category