The prompt
Write unit tests for the function below using [TEST FRAMEWORK]. Cover the happy path, edge cases, and likely failure modes. Use clear test names that describe the scenario. Point out any behavior that's hard to test (a sign it might need refactoring). Function: [PASTE]
More prompts in this discipline
Collected from the Notion template. Want to share one of yours? Submit a prompt.