Skip to content

dwango-js/jasmine-mockdate

Repository files navigation

jasmine-mockdate

Build Status

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

About

Mock Date for legacy Jasmine v1.3.

Resources

Stars

Watchers

Forks

Packages

No packages published