-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Don't throw an error if mock dependency can't be found #10779
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SimenB
approved these changes
Nov 4, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
jeysal
added a commit
to mmkal/jest
that referenced
this pull request
Nov 8, 2020
* master: (398 commits) chore(breaking): remove undocumented `enabledTestsMap` config (jestjs#10787) Change expect.not.objectContaining() to match documentation (jestjs#10708) chore: add name to root project (jestjs#10782) Added explanation on how to use custom @jest-environment to docs (jestjs#10783) fix: remove deprecated functions from the jest object (jestjs#9853) chore: convert jest-runtime to ESM (jestjs#10325) fix(resolve): use escalade to find package.json (jestjs#10781) feat(jest-runner): set exit code to 1 if test logs after teardown (jestjs#10728) chore: add `exports` field to all `package.json`s (jestjs#9921) fix: do not inject `global` variable into module wrapper (jestjs#10644) chore: migrate jest-resolve to ESM (jestjs#10688) chore(transform): refactor API to pass an options bag around rather than multiple boolean options (jestjs#10753) chore: default to node test env rather than browser (jestjs#9874) fix: drop support for node 13 (jestjs#10685) chore: show enhanced syntax error for all syntax errors (jestjs#10749) chore: update lockfile after publish v26.6.3 chore: update changelog for release Don't throw an error if mock dependency can't be found (jestjs#10779) chore: bump babel core types (jestjs#10772) ...
This was referenced Mar 7, 2021
This was referenced Mar 15, 2021
Merged
This was referenced Mar 17, 2021
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
# for free
to subscribe to this conversation on GitHub.
Already have an account?
#.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This fixes #10771, a regression caused by #10713
I've basically wrapped the
getMockModule
call with atry/catch
, similarly to how it's done in the bit above.Test plan
Added a unit test to make sure dependency resolution continues if a mock dependency can't be found.