chai-datetime
chai-datetime copied to clipboard
Improved message-generating functionality
improved version of PR #52
- in
closeToTime
second argument assertions moved to thechai.datetime.closeToTime
(more logical, and also allows monkey-patching the lib withmomentjs
objects) - fixed
formatTime
usage for several assertions (they didn't use formatting before) -
formatDate
andformatTime
called once (not twice) in assertions (very very slight optimization, nearly zero effect, but more beautiful code) - some assertions (equal/not equal) now returns correct
expected/actual
values, also - these values are formatted now
- tests fixed (by applying formatting to assertion messages, just like in other tests)