test-writer
SolidGenerate unit tests for existing code
AI & Automation 148 stars
60 forks Updated today Apache-2.0
Install
Quality Score: 82/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
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
AI & Automation Listed
test-writer
Generate tests that match the project's existing test patterns and framework
0 Updated 1 months ago
claudifytech Testing & QA Listed
test-writer
Generates comprehensive unit and integration tests for a given file or function, auto-detecting the project test framework and matching existing test style.
1 Updated yesterday
RealDougEubanks AI & Automation Listed
test-writer
Write or extend automated tests for a module or feature. Use when the user asks for tests, coverage, or TDD.
6 Updated yesterday
D-engahmed