UNPKG

spur-common

Version:

Common node library that is implemented through the use of spur-ioc and bluebird promises.

16 lines (11 loc) 328 B
describe "DateTimeUtils", -> beforeEach ()-> @clock = sinon.useFakeTimers() injector().inject (@DateTimeUtils, @moment)=> afterEach ()-> @clock.restore() it "now()", -> expect(@DateTimeUtils.now()) .to.deep.equal @moment() it "nowMs()", -> expect(@DateTimeUtils.nowMs()).to.equal +new Date