Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Babel error when running tests with --coverage #1196

Closed
gaelollivier opened this issue Dec 7, 2016 · 5 comments
Closed

Babel error when running tests with --coverage #1196

gaelollivier opened this issue Dec 7, 2016 · 5 comments
Milestone

Comments

@gaelollivier
Copy link
Contributor

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
[email protected] /Users/gael/Desktop/test
└── [email protected]
  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 ?

@cpojer
Copy link
Contributor

cpojer commented Dec 7, 2016

@gaearon
Copy link
Contributor

gaearon commented Dec 7, 2016

Could also be the same as #1156 and #1160, and might be fixed by #1179.
Can you try to repro this on master?

@gaearon
Copy link
Contributor

gaearon commented Dec 7, 2016

This doesn't reproduce on master, and likely was fixed by #1179.
The next patch will address it.

@gaearon gaearon closed this as completed Dec 7, 2016
@gaearon gaearon added this to the 0.8.2 milestone Dec 7, 2016
@gaearon
Copy link
Contributor

gaearon commented Dec 7, 2016

@gaelollivier
Copy link
Contributor Author

Working like a charm, thanks for the fast patch !

image

@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants