MCPcopy Index your code
hub / github.com/nodejs/node / reset

Method reset

lib/internal/test_runner/mock/mock.js:737–741  ·  view source on GitHub ↗

* Resets the mock tracker, restoring all mocks and clearing timers.

()

Source from the content-addressed store, hash-verified

735 * Resets the mock tracker, restoring all mocks and clearing timers.
736 */
737 reset() {
738 this.restoreAll();
739 this.#timers?.reset();
740 this.#mocks = [];
741 }
742
743 /**
744 * Restore all mocks created by this MockTracker instance.

Callers 1

postRunMethod · 0.45

Calls 1

restoreAllMethod · 0.95

Tested by

no test coverage detected