Coding

Missing Unit Test Generator

Reads a pasted diff and writes the unit tests it's missing, in your stated test framework, as runnable code rather than a bulleted test plan. - Covers the happy path, the top 3 edge cases, and at least one failure scenario - Uses realistic sample data instead of placeholder strings like "foo" - Tip: ask it to also write a test that would have caught the bug, if the diff is a fix

Prompt
Based on this diff, write the unit tests that are missing. Use {{test_framework}} — match whatever is in the diff. Write actual test code, not descriptions. Cover: the happy path if not already tested, the top 3 edge cases, and at least one failure/error scenario. Use realistic test data, not placeholder strings like "test" or "foo".

{{diff}}
Download .md

Variables