Back to prompts
CodingClaudeGPT-4

Add tests to existing function

Generates a focused test suite for an untested function.

Variables

Prompt(live preview)

Write tests for this function using {{test_framework}}:

{{code}}

Cover: the happy path, edge cases (empty inputs, null, extreme values), error conditions, and one integration-style test if relevant. Each test should have a clear arrange/act/assert structure and a descriptive name. Don't test implementation details — test behavior. Group related tests in describe blocks.

Comments

No comments yet. Be the first to share your experience with this prompt!

Sign in to leave a comment.