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

Multi-project runner can't find some mocks #4119

Closed
gaearon opened this issue Jul 25, 2017 · 3 comments
Closed

Multi-project runner can't find some mocks #4119

gaearon opened this issue Jul 25, 2017 · 3 comments

Comments

@gaearon
Copy link
Contributor

gaearon commented Jul 25, 2017

Do you want to request a feature or report a bug?

Bug.

What is the current behavior?

In some cases (can't determine when) Jest "loses" some mocks with multi-project runner and emits weird messages.

screen shot 2017-07-25 at 5 24 10 pm

screen shot 2017-07-25 at 5 24 45 pm

You can reproduce by cloning facebook/react#10273 and running npm test. Many failures are expected but these (about missing files) are not.

What is the expected behavior?

Jest can find mocked modules when running with multi-project runner.

Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.

Please use facebook/react#10273 as a base.

@cpojer
Copy link
Member

cpojer commented Aug 8, 2017

@aaronabramov I believe the reason for this one is that the two configs live in the same folder (or run in the same rootDir) and don't have a name field in the config, which means we'll use rootDir for the cacheKey, which then results in the two projects writing and using the same cache. Should be easy to validate by adding a name field to the two config files.

@SimenB
Copy link
Member

SimenB commented Feb 6, 2019

If the above hypothesis is correct, this has been fixed by #5862

@SimenB SimenB closed this as completed Feb 6, 2019
@github-actions
Copy link

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.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants