Test Generation
Specifies the test framework, naming convention, and coverage expectations upfront. The instruction to read the source first prevents Cascade from writing tests against assumed behavior.
Write tests for {{file_path}}:\n\nTest framework: {{test_framework}}\nTest file location: {{test_file_path}}\n\nCoverage requirements:\n- Happy path for each exported function/component\n- Edge cases: empty inputs, null/undefined, boundary values\n- Error cases: invalid inputs, network failures, timeouts\n- {{specific_scenario}} scenario\n\nFor each test:\n- Use descriptive test names: "should [expected behavior] when [condition]"\n- Arrange-Act-Assert pattern\n- Mock external dependencies ({{dependencies_to_mock}})\n- No test interdependencies — each test should run independently\n\nDo not modify the source file. Only create/update the test file. Aim for the tests to pass on the first run — read the source implementation carefully before writing assertions.
Variables to customize
Why this prompt works
Specifies the test framework, naming convention, and coverage expectations upfront. The instruction to read the source first prevents Cascade from writing tests against assumed behavior.
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.