webpack-react-boilerplate icon indicating copy to clipboard operation
webpack-react-boilerplate copied to clipboard

Lack of .babelrc causes errors in testing

Open jonlinnell opened this issue 6 years ago • 0 comments

Loving this project – thanks for all the hard work!

I tried running yarn test out-of-the-box, and got the following error: FAIL __tests__/app.test.jsx ● Test suite failed to run Jest encountered an unexpected token This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript. **By default, if Jest sees a Babel config, it will use that to transform your files**, ignoring "node_modules".

I'm quite new to Jest/Enzyme, but I'll (naively) submit a PR with a .babelrc, if it helps. 😄

jonlinnell avatar Apr 28 '19 08:04 jonlinnell