zxqx / ical-date-parser

Parse a stringly typed iCal date as a native JS date object.
4 stars 1 forks source link

dude #1

Closed bvalosek closed 10 years ago

bvalosek commented 10 years ago

tests plz

would be perfect since its a parser with a basic input -> output use case

zxqx commented 10 years ago

good call - making it happen

bvalosek commented 10 years ago

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:

bvalosek commented 10 years ago

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.

zxqx commented 10 years ago

Good shit man, updated tests here: https://github.com/zakangelle/ical-date-parser/tree/master/test