generate-testslisted
Install: claude install-skill rkz91/coco
# Generate Tests — Comprehensive Test Suite Generator
Generate complete test coverage for any file, component, or module. Covers unit tests, integration tests, edge cases, error handling, and mocking — adapted to whatever testing framework the project uses.
**Use when**: you want tests generated for a file or component, need to improve test coverage, want edge case coverage, need mocks for external dependencies, or want to bootstrap a test suite for untested code.
---
## When This Skill Is Activated
Follow every step below. Do NOT generate tests without first analyzing the project's testing setup and the target code.
---
## Step 1: Detect the Testing Setup
Before writing any tests, discover the project's testing conventions:
1. **Find the test framework** — Check `package.json` (dependencies/scripts), or config files:
- `jest.config.*` / `jest` key in `package.json` → Jest
- `vitest.config.*` → Vitest
- `cypress.config.*` → Cypress
- `playwright.config.*` → Playwright
- `pytest.ini` / `pyproject.toml` [tool.pytest] → pytest
- `go.mod` → Go testing
- `Cargo.toml` → Rust (#[cfg(test)])
2. **Find existing test files** — Search for `*.test.*`, `*.spec.*`, `test_*.py`, `*_test.go` to understand naming conventions and patterns already in use.
3. **Check for test utilities** — Look for shared helpers, factories, custom matchers, or mock setups the project already provides (e.g., `test/utils.ts`, `__mocks__/`, `conftest.py`).
4. **Check the test scrip