fix: support jest.resetModules
correctly in ESM
#13211
Merged
jest.resetModules
correctly in ESM
#13211