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

fix: `require.main` is undefined on using `jest.resetModules` #10626

Merged
merged 7 commits into from Oct 13, 2020

Conversation

@flozender
Copy link
Contributor

@flozender flozender commented Oct 12, 2020

Summary

Closes #10625.

require.main is undefined on using the --resetModules flag. This PR aims to resolve this issue.

Test plan

E2E tests added

@flozender flozender marked this pull request as draft Oct 12, 2020
@flozender flozender marked this pull request as ready for review Oct 12, 2020
flozender added 2 commits Oct 12, 2020
@flozender flozender marked this pull request as draft Oct 12, 2020
@flozender flozender marked this pull request as ready for review Oct 13, 2020
@SimenB
SimenB approved these changes Oct 13, 2020
Copy link
Collaborator

@SimenB SimenB left a comment

thanks!

CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Simen Bekkhus <sbekkhus91@gmail.com>
@SimenB SimenB merged commit 3641e3c into facebook:master Oct 13, 2020
22 checks passed
22 checks passed
cleanup-runs
Details
Running TypeScript compiler & ESLint
Details
Node v10.x on ubuntu-latest
Details
Node v10.x on macOS-latest
Details
Node v10.x on windows-latest
Details
Node v12.x on ubuntu-latest
Details
Node v12.x on macOS-latest
Details
Node v12.x on windows-latest
Details
Node v13.x on ubuntu-latest
Details
Node v13.x on macOS-latest
Details
Node v13.x on windows-latest
Details
Node v14.x on ubuntu-latest
Details
Node v14.x on macOS-latest
Details
Node v14.x on windows-latest
Details
Facebook CLA Check Contributor License Agreement is valid!
Details
ci/circleci: test-jest-circus Your tests passed on CircleCI!
Details
ci/circleci: test-node-10 Your tests passed on CircleCI!
Details
ci/circleci: test-node-12 Your tests passed on CircleCI!
Details
ci/circleci: test-node-13 Your tests passed on CircleCI!
Details
ci/circleci: test-node-14 Your tests passed on CircleCI!
Details
ci/circleci: test-or-deploy-website Your tests passed on CircleCI!
Details
facebook.jest #20201013.5 succeeded
Details
@jsg2021
Copy link

@jsg2021 jsg2021 commented Oct 13, 2020

Looking forward to this getting released :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants
You can’t perform that action at this time.