Jasmine's mock clock is used when testing time dependent code.
Note: Do not construct this directly, Jasmine will make one during booting. You can get the current clock with
Install the mock clock over the built-in methods.
Instruct the installed Clock to also mock the date returned by
| ||Date|| <optional> ||now|| |
Tick the Clock forward, running any enqueued timeouts along the way
| ||int|| |
The number of milliseconds to tick.
Uninstall the mock clock, returning the built-in methods to their places.
Execute a function with a mocked Clock
| ||closure|| |
The function to be called.
© 2008–2017 Pivotal Labs
Licensed under the MIT License.