chai-datetime
chai-datetime copied to clipboard
If the actual value is not a date at all the lib should throw an assertion error
Something like
expect("foobar").to.equalDate(new Date());
causes the code to throw
TypeError: date.toDateString is not a function
However, it would be preferable if the lib throws an assertion error, which makes the problem more clear.
AssertionError: expected non-date object (foobar) to equal Thu June 29 2016
This issue is different from #26 where the author apparently wants the lib to accept strings as actual values.