SyntaxError: Cannot use import statement outside a module in jest setup #400
Unanswered
tyteen4a03
asked this question in
Q&A
Replies: 1 comment
-
It seems to be related to how your build system is configured. Can you try putting this instead: require('@testing-library/jest-dom') Or checkout out that link about enabling ES modules in jest? This is most likely not an issue with jest-dom. We do not control how your build process works. |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
Hi, I'm trying to use jest-dom but running into this:
My setupTests.ts contains one line:
import '@testing-library/jest-dom';
.How can I fix this?
Beta Was this translation helpful? Give feedback.
All reactions