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

refactor(jest-environment)!: remove unnecessary defensive code #15045

Merged
merged 2 commits into from
May 12, 2024
Merged

refactor(jest-environment)!: remove unnecessary defensive code #15045

merged 2 commits into from
May 12, 2024

Conversation

mrazauskas
Copy link
Contributor

Summary

This PR removes unnecessary defensive code which was planned (mostly) to be removed in Jest 30.

Test plan

Green CI.

@mrazauskas mrazauskas changed the title refactor(jest-environment): remove unnecessary defensive code refactor(jest-environment)!: remove unnecessary defensive code Apr 30, 2024
Copy link

netlify bot commented Apr 30, 2024

Deploy Preview for jestjs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 3d27e01
🔍 Latest deploy log https://app.netlify.com/sites/jestjs/deploys/6630df060727030008ba5ee5
😎 Deploy Preview https://deploy-preview-15045--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.

Comment on lines -2270 to -2272
(() => {
throw new Error(
'Your test environment does not support `mocked`, please update it.',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This and following cases are not marked as to be removed in Jest 30, but seem to be unnecessary as well.

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.

nice, thanks!

@SimenB SimenB merged commit 7f2f96b into jestjs:main May 12, 2024
83 of 84 checks passed
@mrazauskas mrazauskas deleted the remove-defensive-code branch May 12, 2024 21:21
@SimenB
Copy link
Member

SimenB commented May 12, 2024

Copy link

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 Jun 13, 2024
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