-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test suite failed to run: Jest encountered an unexpected token "import" #6
Comments
JS ecosystem is a kind of dark magic... Ultimately, I found the reason why my project failed. In my package.json I have a "jest" section with moduleFileExtensions setting. The jest documentation says
so, since I used TS, my moduleFileExtensions looked like this: and I got error
When I changed moduleFileExtensions to the error disappeared. This issue is still valid, I can make a PR with this update if needed. ... |
As for issue in my project: I tried a lot of solutions, and minimum worked solution for me is:
Some of my components contained imports for the .css files, so I:
Also, I added testSetup.js to initialize vuetify there.
As for this project, just the |
@LevYas I'm getting this on windows10 (VueJS/Jest):
|
● Test suite failed to run
|
Hello, any update on this ticket? |
I faced the same issue in my project and tried this one as a reference. Surprisingly, this reference project produced the same error. I use updated packages in my projects, but error is the same.
So, I cloned this repo, opened it in VS Code, then put in terminal:
npm install
npm run test
Here is the result:
What could be the reason and how to fix it?
P.S. There is PR to this repo, I tried this one too and it doesn't produce that error. I tried to figure out the defining differences all the previous workday, but, unfortunately, with no success.
The text was updated successfully, but these errors were encountered: