@tapjs/clock
Advanced tools
Comparing version 0.0.0-5 to 0.0.0-6
{ | ||
"name": "@tapjs/clock", | ||
"version": "0.0.0-5", | ||
"version": "0.0.0-6", | ||
"description": "a make believe clock for tests involving time", | ||
@@ -50,6 +50,6 @@ "type": "module", | ||
"peerDependencies": { | ||
"@tapjs/core": "0.0.0-15" | ||
"@tapjs/core": "0.0.0-16" | ||
}, | ||
"engines": { | ||
"node": ">=16.17" | ||
"node": ">=16" | ||
}, | ||
@@ -56,0 +56,0 @@ "dependencies": { |
@@ -11,2 +11,14 @@ # @tapjs/clock | ||
## USAGE | ||
Add the plugin by running: | ||
``` | ||
tap plugin add @tapjs/clock | ||
``` | ||
Then, you can use it by accessing the `t.clock` object on any | ||
test, which is an instance of the [`Clock` | ||
class](https://isaacs.github.io/clock-mock/classes/Clock.html). | ||
For example: | ||
@@ -28,5 +40,5 @@ | ||
to call `t.clock.exit()` at some point to restore the global | ||
timers to their previous states. | ||
timers to their previous states if you enter it. | ||
See [clock-mock](https://github.com/isaacs/clock-mock) for full | ||
See [clock-mock](https://isaacs.github.io/clock-mock/) for full | ||
API details. |
12661
43