Closed PavelA85 closed 2 years ago
Not sure if it is a connected issue, but also I started to this kind of error:
Test file 'src/components/footer/Footer.test.tsx' is importing or is causing import of another test file 'src/features/mozart/components/MozartFooter/MozartFinishFooter.test.tsx'.
This may cause tests in the 'src/features/mozart/components/MozartFooter/MozartFinishFooter.test.tsx' file to be executed more than once (when the test file runs and every time it gets imported).
If the 'src/features/mozart/components/MozartFooter/MozartFinishFooter.test.tsx' test file contains some test helper code, try refactoring the reused code into a file of its own and use it by importing the new file into 'src/components/footer/Footer.test.tsx' and 'src/features/mozart/components/MozartFooter/MozartFinishFooter.test.tsx' test files.
I could not find the references test to test mentioned in this log. Restarting wallaby makes this error go away for some time.
Could you please try running:
npx jest --clearCache
That should clear your jest cache for all projects. After doing that, please let us know if you see the error again. If you do, please also tell us if you remember any specific steps your were taking prior to seeing the error that you think may be helpful in reproducing the problem.
RE:
Not sure if it is a connected issue, but also I started to this kind of error:
Test file 'src/components/footer/Footer.test.tsx' is importing or is causing import of another test file 'src/features/mozart/components/MozartFooter/MozartFinishFooter.test.tsx'. This may cause tests in the 'src/features/mozart/components/MozartFooter/MozartFinishFooter.test.tsx' file to be executed more than once (when the test file runs and every time it gets imported). If the 'src/features/mozart/components/MozartFooter/MozartFinishFooter.test.tsx' test file contains some test helper code, try refactoring the reused code into a file of its own and use it by importing the new file into 'src/components/footer/Footer.test.tsx' and 'src/features/mozart/components/MozartFooter/MozartFinishFooter.test.tsx' test files.
I think we would need to see your project source code in order understand your file/project structure and how/why this might be occurring.
--
If you're still having problems, could you please provide us with your:
Assuming our suggestion worked for you. If not, please provide us with the details requested and we will re-open the issue and continue investigating.
Yes, it worked. Thank you!
Issue description or question
After a recent Wallaby update, I started to see this exception. Restarting wallaby runner helps.