-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
[docs] ES6 Import patterns and relative paths #972
Comments
could be related to #973 and default exports? reopening this issue as there seems allot of confusion around es6 imports/exports and how babel-jest is interpreting them? |
Can you provide a repository that highlights this issue? I'll take a look asap next week when I return from my vacation.
|
I don't understand how you are using the If this turns out to be a Jest issue after fixing your setup, please provide a repository that shows this issue and I will reopen and fix this bug. |
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. |
This is most likely not and issue and just needs more documentation?
I list my components under relative paths such as:
src/components/index.js
withNODE_ENV=./src
making the following possible:import { MyComponent } from 'components';
When the component under test includes another sub-component from
index.js
Jest throws various errors as it steps into theindex.js
file and picks up ALL my components.Where
MyComponent
imports a sub-component as such:Is there a way to get around this situation where Jest tries to import ALL the components in an index file rather then just what is needed for the test purpose?
The text was updated successfully, but these errors were encountered: