Skip to content

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

Merged
SimenB merged 2 commits into
jestjs:mainfrom
mrazauskas:remove-defensive-code
May 12, 2024
Merged

SimenB merged 2 commits into
jestjs:mainfrom
mrazauskas:remove-defensive-code

Conversation

@mrazauskas

Copy link
Copy Markdown
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
@netlify

netlify Bot commented Apr 30, 2024 •

Copy link
Copy Markdown

βœ… 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
Copy Markdown
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.

@SimenB SimenB left a comment

Copy link
Copy Markdown
Member

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
@mrazauskas
mrazauskas deleted the remove-defensive-code branch May 12, 2024 21:21
@SimenB

SimenB commented May 12, 2024

Copy link
Copy Markdown
Member

@github-actions

Copy link
Copy Markdown

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