jeff 👨💻 ( jeff@programming.dev ) to Programmer Humor@programming.devEnglish · 3 years agoI know I should... but I just really don't wannaprogramming.devimagemessage-square41linkfedilinkarrow-up1368
arrow-up1368imageI know I should... but I just really don't wannaprogramming.devjeff 👨💻 ( jeff@programming.dev ) to Programmer Humor@programming.devEnglish · 3 years agomessage-square41linkfedilink
minus-squarefestus ( festus@lemmy.ca ) linkfedilinkEnglisharrow-up24·3 years agoOne rule of thumb I’ve heard and follow is that every time you encounter a bug, you write a unit test that would catch it. I find that does a pretty good job of getting high code coverage, though maybe that’s cause my code is naturally buggy 😅.
minus-squarebleistift2 ( bleistift2@feddit.de ) linkfedilinkEnglisharrow-up2·3 years ago Writes test to trigger the bug Test is green without fixing the bug. Dafuq?
One rule of thumb I’ve heard and follow is that every time you encounter a bug, you write a unit test that would catch it. I find that does a pretty good job of getting high code coverage, though maybe that’s cause my code is naturally buggy 😅.