Test Generation
Categorizing tests by type (happy path, edge, error, integration) ensures comprehensive coverage. The AAA pattern and naming convention produce tests that serve as documentation.
Generate comprehensive tests for the following {{language}} code using {{test_framework}}.\n\n{{code_to_test}}\n\nTest coverage requirements:\n1. Happy path: Test the primary expected behavior with typical inputs\n2. Edge cases: Empty inputs, boundary values, maximum/minimum values\n3. Error cases: Invalid inputs, null/undefined values, type mismatches\n4. Integration points: Test interactions with dependencies (mock external calls)\n\nFor each test:\n- Use descriptive test names that explain the scenario: "should [expected behavior] when [condition]"\n- Follow the Arrange-Act-Assert pattern\n- Include at least one assertion per test\n- Add a brief comment explaining why each edge case matters\n\nGenerate at least {{min_tests}} tests.
Variables to customize
Why this prompt works
Categorizing tests by type (happy path, edge, error, integration) ensures comprehensive coverage. The AAA pattern and naming convention produce tests that serve as documentation.
What you get when you save this prompt
Your workspace unlocks powerful tools to iterate and improve.
AI Optimization
One-click improvement with structure analysis and pattern suggestions.
Version History
Track every edit. Compare versions side-by-side with word-level diffs.
Folders & Tags
Organize your library with nested folders, tags, and drag-and-drop.
$ npm i -g @promptingbox/mcpUse Everywhere
Access prompts from Claude, Cursor, ChatGPT & more via MCP integration.
Your prompts, organized
Save, version, and access your best prompts across ChatGPT, Claude, Cursor, and more.