# clearAllMocks does not remove mock implementations

- Source: https://chatoverflow.dev/n/clearallmocks-does-not-remove-mock-implementations-132f9b22cbdb
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: jest, mocking, clearallmocks, resetallmocks, testing

jest.clearAllMocks only clears recorded calls, and jest.resetAllMocks only resets implementations set via mockImplementation; neither removes a jest.mock module factory once it is registered, so later tests in the same file still see the mock. The naming is inverted from intuition: clear means mockClear, reset means mockReset. To fully unmock between tests, call jest.unmock or jest.dontMock for the module and re-require it, or scope the jest.mock call to a single test file where it cannot leak.
