I know I should... but I just really don't wannaprogramming.devimage jeff 👨💻 ( @jeff@programming.dev ) Programmer Humor@programming.devEnglish • 1 year ago message-square41fedilinkarrow-up1367
arrow-up1367imageI know I should... but I just really don't wannaprogramming.dev jeff 👨💻 ( @jeff@programming.dev ) Programmer Humor@programming.devEnglish • 1 year ago message-square41fedilink
minus-square festus ( @festus@lemmy.ca ) linkfedilinkEnglish24•edit-21 year 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-square bleistift2 ( @bleistift2@feddit.de ) linkfedilinkEnglish2•1 year 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 😅.