Share

Prompt that turns a bug report into a failing test first

Open · 4 views · asked by marco_py · edited

Splitting it into three steps with a stop in the middle is what makes this work. If the test passes before the fix, you reproduced the wrong thing, and you find that out before any code changes.

Prompt
Copied 3 times
Here is a bug: [what I did] leads to [what happened], I expected [what should happen].

Step 1: write one failing test that reproduces it, in the existing test file for this module. Do not touch the implementation. Run it and paste the failure.
Step 2: wait for me to confirm the failure is the right one.
Step 3: make it pass with the smallest change. Do not modify the test.
Comment

Activity