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

child Components are unnamed when jest run with --coverage flag #51

Closed
tylercrosse opened this issue Mar 1, 2017 · 3 comments
Closed

Comments

@tylercrosse
Copy link

I get a different snapshot depending on whether Jest is run with --coverage. Specifically, when Jest is run with --coverage some but not all of the child components appear simply as <Component /> in the snapshot. When run without the --coverage flag all of the child Components appear in the snapshot with the correct name. Additionally, the components that appear as <Component /> are all stateless functional components written as arrow functions. The child components that retain their name regardless of the coverage flag are class components. I've had a lot of trouble trying to reproduce this issue in a mock repo, but thought it would still be helpful to put it on the project's radar. I can currently avoid the issue by always running tests with or without the coverage flag, but when I switch between the two I need to also update snapshots.

@adriantoine
Copy link
Owner

Hi!

Thanks for reporting the issue. It is a known issue to be fixed on Istanbul, see #19 (comment).

@tylercrosse
Copy link
Author

Thanks! Sorry to waste your time. I missed that in my search before filing this issue.

@adriantoine
Copy link
Owner

No problem, thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants