-
Notifications
You must be signed in to change notification settings - Fork 92
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
SyntaxError: Unexpected token import when using in Jest tests #52
Comments
artemv
added a commit
to artemv/vue-masked-input
that referenced
this issue
Jul 4, 2018
Es2015 preset is deprecated now: https://babeljs.io/docs/en/env.html. This also switches off {modules: false} babelrc option which makes the bundle compatible with Jest and some other env configurations. Fixes niksmr#52 Fixes niksmr#25
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If vue-masked-input is used inside a component tested by Jest I get following error:
This happens because
dist/maskedInput.js
bundle is usingimport
constructs shamelessly - this should be eliminated by Babel. Some Webpack envs handle this, some not, but Jest never.The text was updated successfully, but these errors were encountered: