1

I'm looking to do something similar that's posed in the following question: how to reset module imported between tests

This works, however it resets ALL modules. I only want/need to reload a single module and can't figure out how to accomplish it.

JEST.isolateModules seems like the solution but i haven't been able to get it to work.

Anyone have any examples of reloading just a single module in a JEST test?

CoryDorning
  • 1,854
  • 4
  • 25
  • 36
  • Found the answer here: https://stackoverflow.com/questions/45571816/reset-single-module-with-jest/54791921#54791921 – CoryDorning Feb 24 '22 at 15:56

0 Answers0