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

chore: fix snapshot testing #1090

Merged
merged 5 commits into from
Dec 27, 2022
Merged

chore: fix snapshot testing #1090

merged 5 commits into from
Dec 27, 2022

Conversation

ph-fritsche
Copy link
Member

@ph-fritsche ph-fritsche commented Dec 27, 2022

What:

  1. Print diff of failing inline snapshots.
  2. Use own snapshot matchers in node environment.

Why:

  1. Easier to read than full print of expected vs received.
  2. jest-snapshot calls context.dontThrow() so that tests pass with failing snapshots. I couldn't find documentation how this is supposed to be configured correctly. So for now we don't use jest-snapshot in the toolbox tests.

Checklist:

  • Ready to be merged

@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 27, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 06792b6:

Sandbox Source
userEvent-dom Configuration
userEvent-react Configuration

@codecov
Copy link

codecov bot commented Dec 27, 2022

Codecov Report

Merging #1090 (06792b6) into main (e93a5af) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1090   +/-   ##
=======================================
  Coverage   99.46%   99.46%           
=======================================
  Files          92       92           
  Lines        2070     2070           
  Branches      714      714           
=======================================
  Hits         2059     2059           
  Misses         11       11           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ph-fritsche ph-fritsche marked this pull request as ready for review December 27, 2022 16:17
@ph-fritsche ph-fritsche changed the title chore: print inline snapshot diff chore: fix snapshot testing Dec 27, 2022
@ph-fritsche ph-fritsche merged commit 7a305de into main Dec 27, 2022
@ph-fritsche ph-fritsche deleted the test branch December 27, 2022 18:24
@github-actions
Copy link

🎉 This PR is included in version 14.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant