Skip to content

fix: pass modulePath instead of moduleName to onGenerateMock callback (#15429) #15482

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

Merged
merged 2 commits into from
Apr 4, 2025

Conversation

MillerSvt
Copy link
Contributor

Summary

There is no way to require the actual module for the currently mocked module inside the onGenerateMock callback. I think it would be better to replace the relative module name with the absolute module path.

Copy link

netlify bot commented Jan 30, 2025

Deploy Preview for jestjs failed.

Name Link
🔨 Latest commit f0fbea3
🔍 Latest deploy log https://app.netlify.com/sites/jestjs/deploys/67ef956b235ec10008691d32

@MillerSvt
Copy link
Contributor Author

@SimenB How long do you plan to view this PR? Could you tell me when we can expect it to be released?

@MillerSvt MillerSvt force-pushed the jest-on-mock-hook branch from c557af1 to a782460 Compare April 4, 2025 05:08
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.

thanks!

@SimenB SimenB merged commit 3137c06 into jestjs:main Apr 4, 2025
23 of 27 checks passed
@MillerSvt MillerSvt deleted the jest-on-mock-hook branch April 4, 2025 09:59
Copy link

github-actions bot commented May 5, 2025

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.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants