我正在使用react-ga
v2.5.7,为此我更新了v7.0.2 react-redux
,我正在使用jest
v24.7.1
我react-ga
进去了testMode
,它在我的jest.setup.js
. 但是每次我运行我的测试时,我总是遇到同样的问题,大多数测试都因为一些奇怪的原因而失败:
Test suite failed to run
Cannot find module '@icons/material/CheckIcon' from 'SwatchesColor.js'
However, Jest was able to find:
'./SwatchesColor.js'
You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js', 'json', 'jsx', 'ts', 'tsx', 'node'].
See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string
However, Jest was able to find:
'./SwatchesGroup.js'
You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js', 'json', 'jsx', 'ts', 'tsx', 'node'].
See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string
However, Jest was able to find:
'components/swatches/Swatches.js'
You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js', 'json', 'jsx', 'ts', 'tsx', 'node'].
See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string
However, Jest was able to find:
'./VisualIdentityColorPicker.js'
'./VisualIdentityColorPicker.spec.js'
You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js', 'json', 'jsx', 'ts', 'tsx', 'node'].
See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string
However, Jest was able to find:
'./VisualIdentityBackgroundSelector.js'
'./VisualIdentityBackgroundSelector.spec.js'
You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js', 'json', 'jsx', 'ts', 'tsx', 'node'].
See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string
尽管 SwatchesColors 是完全不相关的模块的依赖项。在我看来,有一个不兼容的问题,我的项目中唯一改变的是添加react-ga
和更新react-redux
,因为有人遇到类似的问题?你是怎么解决的?