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 label and add opposite assertion for toEqual tests #8288

Merged
merged 2 commits into from Apr 10, 2019

Conversation

Projects
None yet
4 participants
@pedrottimark
Copy link
Collaborator

commented Apr 8, 2019

Summary

As prerequisite to improve toEqual matcher report, fix a confusing mistake in its tests:

  • {pass: true} is label for snapshot when .not.toEqual fails (it’s a double negative :)
  • verify that opposite assertion passes like similar tests of toHaveProperty matcher

Bonus change for 'failure message matches the expected snapshot':

  • move test of different values for same key to {pass: fail} tests
  • remove test of same values for same key because it is redundant with {pass: true} tests

Test plan

  • Updated names of 48 snapshot tests
  • Moved and renamed 1 snapshot test
  • Deleted 1 snapshot test
@jeysal

jeysal approved these changes Apr 8, 2019

@codecov-io

This comment has been minimized.

Copy link

commented Apr 8, 2019

Codecov Report

Merging #8288 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #8288   +/-   ##
=======================================
  Coverage   62.14%   62.14%           
=======================================
  Files         266      266           
  Lines       10666    10666           
  Branches     2590     2590           
=======================================
  Hits         6628     6628           
  Misses       3448     3448           
  Partials      590      590

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 dbdb417...fff97f8. Read the comment docs.

@pedrottimark pedrottimark merged commit 1f37a4e into facebook:master Apr 10, 2019

11 checks passed

ci/circleci: lint-and-typecheck Your tests passed on CircleCI!
Details
ci/circleci: test-browser Your tests passed on CircleCI!
Details
ci/circleci: test-jest-circus Your tests passed on CircleCI!
Details
ci/circleci: test-node-10 Your tests passed on CircleCI!
Details
ci/circleci: test-node-11 Your tests passed on CircleCI!
Details
ci/circleci: test-node-6 Your tests passed on CircleCI!
Details
ci/circleci: test-node-8 Your tests passed on CircleCI!
Details
ci/circleci: test-or-deploy-website Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details
facebook.jest #20190408.5 succeeded
Details

@pedrottimark pedrottimark deleted the pedrottimark:fix-toEqual-tests branch Apr 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.