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

jest-matcher-utils: Add color options to matcherHint #8795

Merged
merged 5 commits into from
Aug 9, 2019

Conversation

pedrottimark
Copy link
Contributor

Summary

  • Prerequisite to change expected and received colors in diff when snapshot test fails
  • Contrast for args which do not have received counterpart in the report: precision, n, hint

Baseline hint at left and prototype hint at right

matcherHint

Any color comments welcome now or we can discuss details in following pull requests

Test plan

Added 3 tests for expectedColor, receivedColor, secondArgumentColor

@pedrottimark
Copy link
Contributor Author

In the prototype hints for snapshot tests with properties argument: does the ordinary pattern expected in green and received in red make sense in the report if that part of the assertion fails?

@pedrottimark pedrottimark merged commit 53e964c into jestjs:master Aug 9, 2019
@pedrottimark pedrottimark deleted the matcherHint-color branch August 9, 2019 14:43
jeysal added a commit to felipepastorelima/jest that referenced this pull request Aug 11, 2019
* upstream/master:
  expect: Display equal values for ReturnedWith similar to CalledWith (jestjs#8791)
  Clearer messages for Node assert errors (jestjs#8792)
  use babel-plugin-replace-ts-export-assignment package (jestjs#8805)
  jest-matcher-utils: Add color options to matcherHint (jestjs#8795)
  chore: Make sure copyright header comment includes license (jestjs#8783)
@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.

3 participants