Test Generation

General Productivitywindsurf-promptsfile_pathtest_frameworktest_file_path

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.

Prompt
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

{{file_path}}{{test_framework}}{{test_file_path}}{{specific_scenario}}{{dependencies_to_mock}}

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 OPTIMIZE

AI Optimization

One-click improvement with structure analysis and pattern suggestions.

VERSION DIFF

Version History

Track every edit. Compare versions side-by-side with word-level diffs.

ORGANIZE
Development
Code Review
Testing
Marketing

Folders & Tags

Organize your library with nested folders, tags, and drag-and-drop.

MCP
$ npm i -g @promptingbox/mcp
Claude · Cursor · ChatGPT

Use 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.