I have my tests running on my Project(React/Typescript). Every Test is running perfectly. But suddenly without installing/uninstalling anything, when I tried to add one more test suite. I get this error:
● Test suite failed to run
Cannot find module '@babel/polyfill/lib/noConflict' from 'index.js'
However, Jest was able to find:
'../index.tsx'
You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['ts', 'tsx', 'js', 'jsx', 'json', 'node'].
See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string
Which is super weird. All my other tests, have relative imports and are running just fine. My jest config is perfect, and it includes all the default options that jest suggest.
I tried, the test to be inside an __tests__
directory, with no luck. I tried, to put it inside the same root as the component, with no luck. Can someone tell me what am I doing wrong here?
Aucun commentaire:
Enregistrer un commentaire