-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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 Plugin Display Name Injections Not Used in Coverage Runs #6242
Comments
This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 14 days. |
This issue was closed because it has been stalled for 7 days with no activity. Please open a new issue if the issue is still relevant, linking to this one. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
🐛 Bug Report
When running
--coverage
, Babel transforms on components'displayName
s aren't found, leading to failing tests.I'm using this Babel plugin to change all display names of components created with
react-fela
: https://github.com/louisscruz/babel-plugin-transform-react-fela-display-name.Example test failure:
My understanding is that Babel Jest should be making the transformation (before being instrumented?) specified in my configuration:
And in my
jestConfig.json
:But that doesn't seem to be the case.
To Reproduce
Steps to reproduce the behavior:
displayName
to yourbabel-jest
configuration.displayName
injection to your code.displayName
.jest --coverage
and watch your test fail.Expected behavior
The test runs during coverage collection should use the
displayName
set by the Babel plugin.Run
npx envinfo --preset jest
Paste the results here:
The text was updated successfully, but these errors were encountered: