3 ms·
The risk with this is that your test is possibly not checking the thing you want. I have often found a test that passed even when the code wasn't working. Writi
by IanCal 10y ago
The risk with this is that your test is possibly not checking the thing you want. I have often found a test that passed even when the code wasn't working. Writing the test beforehand, when you know it should fail, helps get around that. You expect it to fail, then write code, then expect it to pass.
I like to at least test my test by commenting out the bit I just added, or somehow manually breaking the code somewhere to check it really does fail when the code doesn't work.