0.1.0 • Published 10 years ago
jasmine-mockdate v0.1.0
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
0.1.0
10 years ago