I recently upgraded from MUI 4->5 and as part of the upgrade I upgraded react-scripts 3 -> 4@4.0.3.
Post upgrade I seem to be having a lot of issues with Jest@26.6.0. My mocks do not seem to be working as intended as well as jest.timeout does not seem to be respected.
Playing around with resetMocks: true my mocks seem to have no effect post migration. With resetMocks: false my mocks seem to not be reset which is expected but my mocks seem to be present after the test comes to completion. As an example if I mock a simple function and call it once in a test the actual function gets called in the first instance and in all the following tests the mock function is called and the number of times called increments by 1. So the calls are 0, 1, 2 etc.
Any suggestions on how to solve this problem outside of ejecting and handling jest manually?