Skip to main content

method MockTimers.prototype.reset

#MockTimers.prototype.reset(): void

This function restores the default behavior of all mocks that were previously created by this MockTimers instance and disassociates the mocks from the MockTracker instance.

Note: After each test completes, this function is called on the test context's MockTracker.

import { mock } from 'node:test';
mock.timers.reset();

Return Type #

void

Did you find what you needed?

Privacy policy