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: refactor _importCoreModule so required core module is consistent #15517

Merged
merged 4 commits into from
Feb 21, 2025

Conversation

jonasongg
Copy link
Contributor

fixes #15077

Copy link

linux-foundation-easycla bot commented Feb 20, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link

netlify bot commented Feb 20, 2025

Deploy Preview for jestjs ready!

Name Link
🔨 Latest commit c71a8c9
🔍 Latest deploy log https://app.netlify.com/sites/jestjs/deploys/67b82be52288a8000893497d
😎 Deploy Preview https://deploy-preview-15517--jestjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@SimenB
Copy link
Member

SimenB commented Feb 20, 2025

Thanks for the PR! Mind adding a test that covers the bug as well?

@jonasongg jonasongg changed the title fix: refactor _importCoreModel so required core module is consistent fix: refactor _importCoreModule so required core module is consistent Feb 20, 2025
@jonasongg
Copy link
Contributor Author

@SimenB Given the original bug's flakiness, is it a good idea to test the private method _importCoreModule? Apologies for my unfamiliarity with the codebase - if you could point me in a general direction to go ahead with the testing?

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking we could do an integration test where we add a property to a node core module while it's loading, but I think it'd be fiddly as we cache the module, so we'd have to do something in parallel and somehow time it right. Doesn't sound like a stable test at all, so let's ship this as-is 👍

@SimenB SimenB merged commit f4246f3 into jestjs:main Feb 21, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: ReferenceError: Export 'emit' is not defined in module from Jest internals during suite setup.
2 participants