react-imported-component
react-imported-component copied to clipboard
Jest unit tests warning
Hi, After I started using react-imported-component I have tones of messages in the console when I launch jest.js unit tests.
console.warn react-imported-component: no mark found at [Function] Please check babel plugin or macro setup, as well as imported-component's limitations. See https://github.com/theKashey/react-imported-component/issues/147
Do you know how to solve them? So far I am running jest with --silent flag, but it is not the best approach for our app.
🤦 https://github.com/theKashey/react-imported-component/blob/0b55a5489a62684ff6ecbec4e9b101d49ebc8015/src/loadable/loadable.ts#L149 - it should be straight opposite condition.
But basically your problem is about missing babel plugin or macro.
Any solution on how to add babel plugin or macro to jest.js? I don't have this problem in the application, this spam is just running only during unit tests
Usually via .babelrc, or babel-jest configuration if you have it as a separate.