Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Issues
  • #949
Closed
Open
Issue created Oct 24, 2016 by Administrator@rootContributor

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

  1. npm ls react-scripts (if you haven’t ejected): react-scripts@0.7.0
  2. node -v: v6.7.0
  3. npm -v:3.10.3

Then, specify:

  1. Operating system: Macbook-pro
  2. Browser and version:

Reproducible Demo

https://github.com/fadeojo/demo

Assignee
Assign to
Time tracking