jasmine-mockdate
v0.1.0
Published
Mock Date for legacy Jasmine v1.3
Downloads
102
Readme
jasmine-mockdate
Mock Date for Jasmine v1.3. For v2.x, use jasmine.clock().mockDate()
instead.
jasmine.Clock.useMock();
// enable MockDate
jasmine.Clock.useMockDate();
var now = new Date().getTime();
jasmine.Clock.tick(100);
// MockDate works in conjunction with tick().
expect(new Date().getTime()).toEqual(now + 100);
Installation
$ npm install jasmine-mockdate
License
MIT