by dan-robertson · 4y ago · 0 comments
1. Introduce new test exhibiting bug
2. Introduce bug fix and update the test
If 1 and 2 are reviewed together you have less evidence that the test actually shows the bug being fixed.
We actually have a rule that there must be 1 commit just introducing a test that fails on CI for bugfix PRs.
"rule that there must be 1 commit just introducing a test that fails on CI for bugfix PRs"
EDIT: at least in rebase workflows which is what I'm used to. I guess in merge workflows this works.
1. Merge #2 into #1 then merge the result, but this can obscure your history
2. Don’t make the test fail. Eg expect the incorrect behaviour and leave a comment explaining why it is incorrect and what the correct thing should be.