Closed rbuckton closed 3 months ago
Following discussion in the Design Meeting, we've decided not to take this fix as we would be inconsistent with esbuild, babel, et al. There are already workarounds for this, such as using jest.unstable_moduleMock
, and this seems like an issue Jest would need to address in their mock implementation so as to be compatible with other transpilers, such as replacing the module object, introducing a Proxy
, etc.
This is the companion PR to microsoft/TypeScript#57784 which improves compatibility with Jest's module mocking mechanism.