jasmine-mockdate

0.1.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i jasmine-mockdate

Weekly Downloads

32

Version

0.1.0

License

none

Last publish

Collaborators

  • nkzawa