Write Missing Tests
Generate a test suite for untested code covering normal paths, edge cases, and error conditions.
Intermediate1 min read
Customize
Fill these in and the prompt below updates as you type. Anything you leave blank stays as a placeholder.
Your prompt
2 placeholders leftI need tests for this existing code: {{code}} Generate a test suite using {{test_framework}} that covers: - Every public function/method - Normal inputs with expected outputs - Edge cases (empty inputs, max values, null, special characters) - Error conditions (what should throw/reject/return errors) - Integration between functions if applicable For each test, explain what it's verifying and why that case matters. Organize tests by function with describe/context blocks. Aim for 90%+ code coverage.