This repository is a demonstration on how to use ESM mocks in Jest with both JS and TS (via ts-jest
)
yarn test:js
yarn test:ts
- To reset your mocks between tests, use
jest.resetModules()
Demonstration on how to use ESM mocks with Jest for both JS and TS
JavaScript
This repository is a demonstration on how to use ESM mocks in Jest with both JS and TS (via ts-jest
)
yarn test:js
yarn test:ts
jest.resetModules()