'jest - Use mock for all tests except one

I have a project tested using Jest where I need to mock one local module in order to run tests on various components without problems. Therefore I created a global mock (thus used by all tests), the problem is that it gets mocked for the tests which are testing that very module, therefore they fail. I could make a local mock of the module in all tests except that one, but it feels bad practice as I have dozens of test suites and I would have to replicate the mock for all of them.
Is there a way I can mock a module for all but some suites? Could not find a reference to anything like this in Jest's docs. Thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source