[Bug]: Multiple You are trying to import a file outside of the scope of the test code.
errors when bumping to 29.6.0
#14302
Labels
Version
29.6.0
Steps to reproduce
There's a reproducible case in this repository:
https://github.com/juan-fernandez/test-jest-bug
The steps to follow are:
When you run
yarn test
, you see that the test fails with an error that wasn't there in [email protected].Expected behavior
While I understand that the test
bad-test.test
itself is bad (hence the name), and this is something that the test shouldn't be doing, I think it makes sense to add this check either as a warning or with a way to opt out, so that jest users can adapt to this new behavior incrementally.Actual behavior
You see this error:
Additional context
I don't think this is a bug (this issue does not fit in proposal or question either), and I think the changes in #14110 make sense, but there's no way right now to adjust to this change incrementally.
Environment
The text was updated successfully, but these errors were encountered: