-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
jest runs all tests found in monorepo [email protected] #4410
Comments
It has some really weird effects, such as if you have a cypress directory for e2e under the CRA app directory, jest would skip them but if you have a cypress directory in a imported workspace, jest would happily decide to run it and fail. |
This is likely related to #3967 |
@bugzpodder The current 2.0 implementation assumes that you want all workspaces in the monorepo to be treated as part of your app source (transpiled, linted, and tested), there is no way to opt in or out. #4092 proposes to fix this by requiring workspaces to be opted in. It's not clear if that would fix your use cases, though. (e.g, Are you wanting to transpile the other workspaces, but not run their tests?) What do you think? (BTW, as a workaround for the current issue, you should be able to give a pattern to the test command, e.g. |
Thanks for the quick scoping fix! Though I totally agree there should be a better way to go about this before 2.0. EDIT: scoping isn't a great long-term solution as hitting |
Jest currently runs all tests it can find in every workspace in the monorepo (spec/tests) when ran from CRA workspace.
This is somewhat unexpected, and can be problematic:
If needed I can try to get a clean repro up.
The text was updated successfully, but these errors were encountered: