diff --git a/doc/api/test.md b/doc/api/test.md index 07bb62742a85b1..95d95e3f5df3ab 100644 --- a/doc/api/test.md +++ b/doc/api/test.md @@ -1983,7 +1983,8 @@ Enables timer mocking for the specified timers. The currently supported timer values are `'setInterval'`, `'setTimeout'`, `'setImmediate'`, and `'Date'`. **Default:** `['setInterval', 'setTimeout', 'setImmediate', 'Date']`. If no array is provided, all time related APIs (`'setInterval'`, `'clearInterval'`, - `'setTimeout'`, `'clearTimeout'`, and `'Date'`) will be mocked by default. + `'setTimeout'`, `'clearTimeout'`, `'setImmediate'`, `'clearImmediate'`, and + `'Date'`) will be mocked by default. * `now` {number | Date} An optional number or Date object representing the initial time (in milliseconds) to use as the value for `Date.now()`. **Default:** `0`. @@ -2038,10 +2039,11 @@ mock.timers.enable({ apis: ['Date'], now: new Date() }); Alternatively, if you call `mock.timers.enable()` without any parameters: -All timers (`'setInterval'`, `'clearInterval'`, `'setTimeout'`, and `'clearTimeout'`) -will be mocked. The `setInterval`, `clearInterval`, `setTimeout`, and `clearTimeout` -functions from `node:timers`, `node:timers/promises`, -and `globalThis` will be mocked. As well as the global `Date` object. +All timers (`'setInterval'`, `'clearInterval'`, `'setTimeout'`, `'clearTimeout'`, +`'setImmediate'`, and `'clearImmediate'`) will be mocked. The `setInterval`, +`clearInterval`, `setTimeout`, `clearTimeout`, `setImmediate`, and +`clearImmediate` functions from `node:timers`, `node:timers/promises`, and +`globalThis` will be mocked. As well as the global `Date` object. ### `timers.reset()` @@ -2072,7 +2074,7 @@ mock.timers.reset(); Calls `timers.reset()`. -### `timers.tick(milliseconds)` +### `timers.tick([milliseconds])`