An extension to the chai assertion library that provides a set of date assertions.
$ npm install chai-date
Use the assertions with chai's expect
or should
assertions.
Asserts that the given date is today
var today = new Date()
today.should.be.today()
Asserts that the given date is yesterday
var yesterday = new Date(today.getDate() - 1)
yesterday.should.be.yesterday()
Asserts that the given date is tomorrow
var tomorrow = new Date(today.getDate() + 1)
tomorrow.should.be.tomorrow()
$ npm test
Authors Christopher Garvis & Moveline
MIT