All tests are running absolutely fine with jest for React component from command line. But the moment I run the test using WebStorm (i.e. run as) I am getting following errors.
Test suite failed to run
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){var _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a};function _objectWithoutProperties(a,b){var c={};for(var d in a)0<=b.indexOf(d)||Object.prototype.hasOwnProperty.call(a,d)&&(c[d]=a[d]);return c}import React,{Component}from'react';import PropTypes from'prop-types';import cx from'classnames';import style from'./input.css';export default class Input extends Component{static get NORMAL(){return'normal'}static get UNDERLINE(){return'underline'}render(){const a=this.props,{className:b,inputStyle:c}=a,d=_objectWithoutProperties(a,['className','inputStyle']),e=cx([`body-small pad-05r`],{[`bdr-rad4 ${style.defInp}`]:c===Input.NORMAL,[`text-center ${style.bottomBdr}`]:c===Inpu
SyntaxError: Unexpected token import
at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/ScriptTransformer.js:289:17)
at Object.<anonymous> (src/components/input/index.jsx:3:14)
at Object.<anonymous> (src/components/input/__tests__/input.test.js:3:14)
Kindly help