# Test Writer

> Generate comprehensive unit tests with edge cases and mocks

- **Type:** Skill
- **Install:** `agentstack add skill-amelmo-loadout-test-writer`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [AmElmo](https://agentstack.voostack.com/s/amelmo)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [AmElmo](https://github.com/AmElmo)
- **Source:** https://github.com/AmElmo/loadout/tree/main/fixtures/home/.gemini/skills/test-writer

## Install

```sh
agentstack add skill-amelmo-loadout-test-writer
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Test Writer

Given a function, hook, or module, generate comprehensive unit tests:

1. **Happy path**: Normal usage with expected inputs and outputs
2. **Edge cases**: Empty inputs, boundary values, max/min, unicode, null/undefined
3. **Error paths**: Invalid inputs, network failures, timeout scenarios
4. **Async behavior**: Promise resolution, rejection, loading states
5. **Integration**: How the unit interacts with its direct dependencies

## Rules

- Use `vitest` with `describe` / `it` blocks
- Mock external dependencies with `vi.mock()` — never mock the unit under test
- Use `@testing-library/react` and `renderHook()` for React hooks
- Each test should verify exactly one behavior
- Use descriptive test names: `it("returns empty array when input is null")`
- Include setup/teardown in `beforeEach`/`afterEach` when shared across tests
- Aim for 90%+ branch coverage on the unit under test

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [AmElmo](https://github.com/AmElmo)
- **Source:** [AmElmo/loadout](https://github.com/AmElmo/loadout)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-amelmo-loadout-test-writer
- Seller: https://agentstack.voostack.com/s/amelmo
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
