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: Align snapshots in jest-matcher-utils #8957

Merged
merged 9 commits into from
Sep 24, 2019

Conversation

pedrottimark
Copy link
Contributor

Summary

Display colors concisely and clearly so you can review future changes quickly and confidently

Test plan

  • index.test.ts replace 2 toMatchSnapshot assertions with toBe and more precise criterion
  • index.test.ts.snap update 11 which are from toThrowErrorMatchingSnapshot assertions
  • printDiffOrStringify.test.ts.snap update 6

@pedrottimark
Copy link
Contributor Author

pedrottimark commented Sep 21, 2019

@jeysal Continuing our discussion from #8959 what do you think about this method to serialize aligned snapshots of diffs and reports when matcher fails:

import convertAnsi1 from '../../../pretty-format/src/plugins/ConvertAnsi1';

expect.addSnapshotSerializer(convertAnsi1);
  • snapshots in expect package can use this method in separate pull request
  • snapshots in jest-snapshot will need own serializer for colors in future pull request
  • snapshots of generic CLI output can continue to use the original ConvertAnsi plugin

@codecov-io
Copy link

codecov-io commented Sep 21, 2019

Codecov Report

Merging #8957 into master will decrease coverage by 0.07%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #8957      +/-   ##
=========================================
- Coverage   63.98%   63.9%   -0.08%     
=========================================
  Files         276     277       +1     
  Lines       11638   11652      +14     
  Branches     2859    2859              
=========================================
  Hits         7446    7446              
- Misses       3562    3576      +14     
  Partials      630     630
Impacted Files Coverage Δ
...kages/test-utils/src/alignedAnsiStyleSerializer.ts 0% <0%> (ø)

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 9583060...c55f280. Read the comment docs.

@pedrottimark pedrottimark merged commit 3adb67b into jestjs:master Sep 24, 2019
@pedrottimark pedrottimark deleted the align-matcher-utils branch September 24, 2019 15:05
@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 May 11, 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.

4 participants