react-imported-component icon indicating copy to clipboard operation
react-imported-component copied to clipboard

Jest unit tests warning

Open KoderFPV opened this issue 5 years ago • 3 comments

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.

KoderFPV avatar Aug 28 '20 06:08 KoderFPV

🤦 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.

theKashey avatar Aug 28 '20 07:08 theKashey

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

KoderFPV avatar Aug 28 '20 07:08 KoderFPV

Usually via .babelrc, or babel-jest configuration if you have it as a separate.

theKashey avatar Aug 28 '20 07:08 theKashey