Closed rabbl closed 2 years ago
I could fix this problem, adding a babel.config.js
module.exports = api => {
api.cache(true);
return {
presets: ["@babel/preset-env", "@babel/preset-react"],
plugins: [
"@babel/plugin-transform-runtime",
["@babel/plugin-proposal-class-properties"],
]
};
};
and adding the transformIgnorePatterns
to jest.config.ts
transformIgnorePatterns: [
'node_modules/(?!react-movable)'
],
Here's what you can do:
• If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it.
• If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript
• To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
• If you need a custom transformation specify a "transform" option in your config.
• If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.
You need to set your Jest to support ESM.
I think it's solved for this usecease and I'll close this issue.
@tajo Unable to fix this issue can you help me to solve this issue jest.config.s
const customJestConfig = {
roots: ['
We have implemented react-movable successfully in our react-typescript codebase and it works great.
Thanks for this great library.
Running the tests with jest are failing with the following error
here is our jest.config
Do you have experienced this error? Is there a workaround to fix this issue somehow?
Thanks :)