chai-datetime icon indicating copy to clipboard operation
chai-datetime copied to clipboard

Improved message-generating functionality

Open maxkoryukov opened this issue 8 months ago • 1 comments

improved version of PR #52

  1. in closeToTime second argument assertions moved to the chai.datetime.closeToTime (more logical, and also allows monkey-patching the lib with momentjs objects)
  2. fixed formatTime usage for several assertions (they didn't use formatting before)
  3. formatDate and formatTime called once (not twice) in assertions (very very slight optimization, nearly zero effect, but more beautiful code)
  4. some assertions (equal/not equal) now returns correct expected/actual values, also - these values are formatted now

  1. tests fixed (by applying formatting to assertion messages, just like in other tests)

maxkoryukov avatar Jun 28 '24 17:06 maxkoryukov