Closed bvalosek closed 10 years ago
good call - making it happen
Current tests are a good start, they effectively assert that parsing a date gives us "some" numbers back and doesn't error out. You could basically roll those all up into one suite (one test( ... )
call), that is just a sanity check to makes sure all the methods return numbers.
Something to keep in mind:
test( ... )
blockt.strictEqual(new ICalDateParser(input).parse().getMinutes(), 34, 'desc');
Also dont forget to test for bad inputs. Whether you throw (and what type of error is thrown), or return undefined
or null
or whatever is up to you but make sure its defined and tested.
Good shit man, updated tests here: https://github.com/zakangelle/ical-date-parser/tree/master/test
tests plz
would be perfect since its a parser with a basic input -> output use case