How to config Jest (with Rust compiler) to work with mjs? #34182
Unanswered
kouliavtsev
asked this question in
Help
Replies: 3 comments 2 replies
-
Hi @kouliavtsev , I'm having the same issue. Were you able to find a solution? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Try something like this: {
transformIgnorePatterns: [
"node_modules/(?!(remark-unwrap-images|unist-util-visit|unist-util-visit-parents|unist-util-find-after|unist-util-is|hast-util-whitespace)/)",
],
transform: {
"^.+\\.(js|jsx|ts|tsx|mjs)$": ["babel-jest", { presets: ["next/babel"] }],
},
} |
Beta Was this translation helpful? Give feedback.
2 replies
-
Try making the tests folder outside of src folder. I make at the root level and it works as expected. |
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
-
When the test is run, I get the following error:
Configured Jest by using default Settings (with Rust compiler).
The test looks like this:
The page looks something like this.
Beta Was this translation helpful? Give feedback.
All reactions