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

Document and test dontThrow for custom inline snapshot matchers #10995

Merged
merged 6 commits into from
May 20, 2021

Conversation

eps1lon
Copy link
Contributor

@eps1lon eps1lon commented Jan 2, 2021

Summary

Closes #10888

Only documents it for inline snapshots since full snapshots would be reported as obsolete which isn't really ideal behavior. I guess ideally we could detect if obsolete snapshots are part of a test that failed and a note that they might not be obsolete after-all. For inline snapshots the current behavior with dontThrow looks ok to me.

Test plan

  • CI green (failures look unrelated)

@eps1lon eps1lon marked this pull request as ready for review January 2, 2021 17:10
@codecov-commenter
Copy link

codecov-commenter commented May 17, 2021

Codecov Report

Merging #10995 (f41fd43) into master (bdd6282) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #10995   +/-   ##
=======================================
  Coverage   64.22%   64.22%           
=======================================
  Files         309      309           
  Lines       13519    13519           
  Branches     3294     3294           
=======================================
  Hits         8683     8683           
  Misses       4122     4122           
  Partials      714      714           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bdd6282...f41fd43. Read the comment docs.

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!

could you add an entry to the changelog?

@eps1lon
Copy link
Contributor Author

eps1lon commented May 18, 2021

could you add an entry to the changelog?

I didn't actually change any implementation. Or should I just add an entry like "Allow bailing out of failing tests with custom inline snapshot matchers"?

@SimenB
Copy link
Member

SimenB commented May 18, 2021

Yeah, under docs or something 👍

@SimenB SimenB merged commit a397607 into jestjs:master May 20, 2021
@github-actions
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 20, 2021
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.

failing toMatch(Inline)Snapshot does not abort test
4 participants