Write unit tests

Tests that catch real bugs.

chatgptclaude
Act as a test engineer. Write unit tests for the code below using [framework]. Cover the happy path, edge cases, and error conditions, use clear test names, and note any behavior that's ambiguous or hard to test. Aim for meaningful coverage, not just line coverage. Code: [paste]

How to use this prompt

  1. Tap Copy prompt above.
  2. Replace the [bracketed] parts with your own details.
  3. Paste it into chatgpt, claude.