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
  • #1196
Closed
Open
Issue created Dec 07, 2016 by Administrator@rootContributor

Babel error when running tests with --coverage

Created by: gaelollivier

Description

Steps:

  • create a fresh app
  • anywhere inside App.js, add the following code
function* test() {
  yield ((a) => 42)
}
  • run npm run test => works
  • run npm run test -- --coverage => crashes

Expected behavior

This syntax is valid js, it works in the browser and with tests without coverage so I expect it to work with coverage activated

Actual behavior

This error is thrown: image

Environment

  1. npm ls react-scripts
test@0.1.0 /Users/gael/Desktop/test
└── react-scripts@0.8.1
  1. node -v:
v6.4.0
  1. npm -v:
3.10.6
  1. Operating system: OSX 10.12.1
  2. Browser and version: N/A

I guess this is a Jest issue, so I ping @cpojer ?

Assignee
Assign to
Time tracking