test-writerlisted
Install: claude install-skill RealDougEubanks/ClaudeMarketplace
# Test Writer
Generate comprehensive unit and integration tests for a given file or function, auto-detecting the project test framework and matching the existing test style.
## Instructions
When invoked via `/test-writer`:
1. **Identify the target.** Ask the user: which file or function should tests be written for? Accept:
- An absolute or relative file path (e.g. `src/utils/parser.ts`)
- A function or method name (ask which file it lives in if ambiguous)
2. **Read the target file** using Read. Understand:
- All exported/public functions, classes, and methods
- Their parameter types, return types, and documented or inferred behavior
- Dependencies (imports/requires) that will need to be mocked
3. **Detect the test framework** using Glob and Read:
- **Jest**: look for `jest.config.*`, or `"jest"` key in `package.json`
- **Vitest**: look for `vitest.config.*`, or `"vitest"` in `package.json` devDependencies
- **pytest**: look for `pytest.ini`, `pyproject.toml` containing `[tool.pytest.ini_options]`, or `conftest.py`
- **Go test**: look for `go.mod` and any existing `*_test.go` files
- **PHPUnit**: look for `phpunit.xml` or `phpunit.xml.dist`, or `phpunit/phpunit` in `composer.json`
- **Mocha**: look for `.mocharc.*`, or `"mocha"` in `package.json` devDependencies
- **RSpec**: look for `.rspec`, `spec/spec_helper.rb`, or `rspec` in `Gemfile`
- **JUnit**: look for `junit` in `pom.xml` or `build.gradle`/`build.gradle.kts`
- **xUnit /