Hacker News new | ask | show | jobs
by ericHosick 4566 days ago
Tests and behavior should be defined before the code.

I recommend you comment out all code, write the tests and then un-comment the code line by line.

This not only tests the code, but tests the tests and assures that you are covering the edge cases the code contains already.

1 comments

Update: Unit tests are now a convention.