I'm working on the geochrono[1] project a little bit at the time. I unexpectedly came across a benefit of unit testing I'd forgotten about, documentation by testcase. One of the first requirements for geochrono is: The user will be allowed to add events or person chrono-locations by adding markers to a map at the appropriate location. First implementation The user will be required to enter the year, month, and day of the month in three distinct textboxes before clicking on OK. The date will be checked as valid using code available at stackexchange [2]. Testcase: Send bad and good dates to date checker code. Something like this: The requirements and testcsases seemed simple enough. Form a bad date and pass it into the date checking function. Something like this should have done the trick: assert.equal(isValidDate(new Date(1980, 100, 150)), false); You get the idea, pass in a month that doesn't exist, (100), and a day of the month ...