How to use ESM modules instead of cjs? #1135
Unanswered
alexander-xyz
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using jest --env=jsdom to run my tests along with the latest version of the user-event library. When I import userEvent from '@testing-library/user-event', it seems to use CommonJS (CJS) modules. However, I would like to include ECMAScript modules (ESM) files instead of CJS.
Is there a way to import the ESM files of user-event instead of the CJS files when using Jest with the --env=jsdom flag? If not, is there any specific configuration or workaround that I can use to achieve this?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions