date-fns icon indicating copy to clipboard operation
date-fns copied to clipboard

test: add some edge case tests for parsing

Open 43081j opened this issue 1 year ago • 0 comments

i was just getting my head around the repo so here's a test or two from while i was in there.

although the typescript types enforce we pass a number or date to toDate, non-ts consumers could pass invalid types.

the source accounts for this but the tests don't, so i went ahead and added one.

the other two are trying to test that the available day periods are supported, not sure if thats the best way to test those (or the right place).

43081j avatar Oct 16 '22 11:10 43081j