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

expect: Improve report when matcher fails, part 7 #7866

Merged
merged 2 commits into from
Feb 12, 2019

Conversation

pedrottimark
Copy link
Contributor

@pedrottimark pedrottimark commented Feb 11, 2019

Summary

For 4 matchers which correspond to >, >=, <, <= number comparison operators:

  • Display matcher name in regular black instead of dim color
  • Repeat not and operator following Expected: label

For more information, see discussion with @jeysal in #7795

For these matchers which define expected intervals, I have not thought of any additional way to reduce apparent weirdness when received value is equal to expected boundary.

Residue for future pull request, in call to ensureNumbers helper function:

  • Delete period in matcher name to display matcher name in regular black instead of dim color
  • Provide options as argument to display promise and isNot

Test plan

Updated 66 snapshots. To save mental effort, review as 33 adjacent pairs of snapshots.

matcher
14 toBeGreaterThan
19 toBeGreaterThanOrEqual
14 toBeLessThan
19 toBeLessThanOrEqual

Here are pictures for 2 out of 4 matchers:

  • beyond baseline at left (matcher name already black instead of dim)
  • improved at right

tobegreaterthanorequal 3

tobelessthan 3

Copy link
Collaborator

@thymikee thymikee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking sharp

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.

Oh yeah, this is awesome!

Copy link
Contributor

@jeysal jeysal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great that we found a format we're both happy with 👍

@pedrottimark
Copy link
Contributor Author

Finally catching up, this pull request provides concise solution to problem reported in #7105

/cc @Abhishek-Modi-Happyperks @joanasmramos

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

5 participants