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.
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.