Jest · Method
jest.resetAllMocks
jest.resetAllMocks() resets the state of all Jest mocks. It removes mock implementations but does not restore original implementations.
Last updated
Syntax
jest.resetAllMocks()In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
jest.clearAllMocks()jest.restoreAllMocks()jest.fn()jest.spyOn()resetMocks--resetMocks