You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If vue-masked-input is used inside a component tested by Jest I get following error:
FAIL test/unit/specs/PhoneEntry.spec.js
● Test suite failed to run
/Users/artem/my-project/node_modules/vue-masked-input/dist/maskedInput.js:3
import InputMask from 'inputmask-core';
^^^^^^
SyntaxError: Unexpected token import
This happens because dist/maskedInput.js bundle is using import 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:
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.
Fixesniksmr#52Fixesniksmr#25
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: