Skip to content

feat(jest-snapshot): Support Error.cause in snapshots#13965

Merged
SimenB merged 4 commits into
jestjs:mainfrom
dubzzz:to-match-snap
Sep 20, 2023
Merged

feat(jest-snapshot): Support Error.cause in snapshots#13965
SimenB merged 4 commits into
jestjs:mainfrom
dubzzz:to-match-snap

Conversation

@dubzzz

@dubzzz dubzzz commented Feb 28, 2023

Copy link
Copy Markdown
Contributor

Summary

Up to now, the "error with cause" was not fully supported in snapshots. This PR adds support for it!

Fixes #11935

Test plan

Some dedicated E2E tests have been added to cover the feature.

@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.

Thanks!

I wonder if this should be considered a breaking change? If people snapshot errors with causes today, their snapshots will break with this change...

@SimenB SimenB added this to the Jest 30 milestone Mar 1, 2023
@SimenB SimenB added the Pinned label Mar 1, 2023
@dubzzz

dubzzz commented Mar 1, 2023

Copy link
Copy Markdown
Contributor Author

It will definitely be a breaking change 🤔

@legobeat

legobeat commented May 1, 2023

Copy link
Copy Markdown
Contributor

Needs rebase on main.

@dubzzz

dubzzz commented May 1, 2023

Copy link
Copy Markdown
Contributor Author

@SimenB let me know when you want to merge it. I'll rebase it when ok to be merged

@netlify

netlify Bot commented Sep 20, 2023

Copy link
Copy Markdown

Deploy Preview for jestjs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit cbcc1fb
🔍 Latest deploy log https://app.netlify.com/sites/jestjs/deploys/650a9909f25d940008d9dfbb
😎 Deploy Preview https://deploy-preview-13965--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.

@linux-foundation-easycla

linux-foundation-easycla Bot commented Sep 20, 2023

Copy link
Copy Markdown

CLA Signed

The committers listed above are authorized under a signed CLA.

@SimenB

SimenB commented Sep 20, 2023

Copy link
Copy Markdown
Member

@dubzzz hiya 👋 could you sign the CLA? 🙂

@dubzzz

dubzzz commented Sep 20, 2023

Copy link
Copy Markdown
Contributor Author

Thanks a lot @SimenB

@SimenB SimenB enabled auto-merge (squash) September 20, 2023 07:03
@dubzzz

dubzzz commented Sep 20, 2023

Copy link
Copy Markdown
Contributor Author

Yes of course I'll

@dubzzz

dubzzz commented Sep 20, 2023

Copy link
Copy Markdown
Contributor Author

Done 👍

@SimenB SimenB merged commit 571b230 into jestjs:main Sep 20, 2023
@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 Oct 21, 2023
@dubzzz dubzzz deleted the to-match-snap branch October 21, 2023 13:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Print error.cause

4 participants