Unexpected token 'import' error while running Jest tests?
If you are encountering this problem after updating to a newer Jest version, try clearing Jest's internal cache:
jest --clearCache
You just need to make sure that vue-awesome
will be transformed by jest, so add
following to your jest config:
transformIgnorePatterns: ["/node_modules/(?!vue-awesome)"],
which means: "Ignore everything in node_modules except for vue-awesome
.
Also here is exhausive list of other issues that might cause this error: https://github.com/facebook/jest/issues/2081