.babelrc in a parent directory interferes with npm test
Created by: fadeojo
Description
What are you reporting?
I scaffold a new app and run npm test
Expected behavior
successful test coverage and count
Actual behavior
╰─○ npm test
> nethan@0.1.0 test /Users/fadeojo/Development/react/nethan
> react-scripts test --env=jsdom
FAIL src/App.test.js
● Test suite failed to run
Couldn't find preset "es2015" relative to directory "/Users/fadeojo/Development/react"
at node_modules/react-scripts/node_modules/babel-core/lib/transformation/file/options/option-manager.js:298:19
at Array.map (native)
at OptionManager.resolvePresets (node_modules/react-scripts/node_modules/babel-core/lib/transformation/file/options/option-manager.js:269:20)
at OptionManager.mergePresets (node_modules/react-scripts/node_modules/babel-core/lib/transformation/file/options/option-manager.js:258:10)
at OptionManager.mergeOptions (node_modules/react-scripts/node_modules/babel-core/lib/transformation/file/options/option-manager.js:243:14)
at OptionManager.init (node_modules/react-scripts/node_modules/babel-core/lib/transformation/file/options/option-manager.js:373:12)
at File.initOptions (node_modules/react-scripts/node_modules/babel-core/lib/transformation/file/index.js:221:65)
at new File (node_modules/react-scripts/node_modules/babel-core/lib/transformation/file/index.js:141:24)
at Pipeline.transform (node_modules/react-scripts/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 0.795s
Ran all test suites.
Environment
Run these commands in the project folder and fill in their results:
-
npm ls react-scripts
(if you haven’t ejected): react-scripts@0.7.0 -
node -v
: v6.7.0 -
npm -v
:3.10.3
Then, specify:
- Operating system: Macbook-pro
- Browser and version: