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

feat(matchers): support asymmetric matchers #37

Merged
merged 3 commits into from Apr 23, 2018

Conversation

Ailrun
Copy link
Collaborator

@Ailrun Ailrun commented Apr 22, 2018

resolve #36

What: Support asymmetric matchers (#36)

Why: Using asymmetric matchers make tests easier

How: see https://github.com/facebook/jest/blob/be4bec387d90ac8d6a7596be88bf8e4994bc3ed9/packages/expect/src/jasmine_utils.js#L36

This can support expect@^21 || ^22, and jest-matchers@^19 || ^20, but I do not know how to add exclusive-or-ly those peerDeps. Is there a way to do so?

@Ailrun
Copy link
Collaborator Author

Ailrun commented Apr 22, 2018

Oh, there're some coverage problems. I will add some tests...

@codecov
Copy link

codecov bot commented Apr 22, 2018

Codecov Report

Merging #37 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #37   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           4      4           
  Lines         152    158    +6     
  Branches       39     41    +2     
=====================================
+ Hits          152    158    +6
Impacted Files Coverage Δ
src/matchers.js 100% <100%> (ø) ⬆️

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 21fdeff...2827a64. Read the comment docs.

Copy link
Owner

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

Looks super! Thanks!

@kentcdodds kentcdodds merged commit a2bec88 into kentcdodds:master Apr 23, 2018
@kentcdodds
Copy link
Owner

Actually, would you like to add documentation for this feature?

@kentcdodds
Copy link
Owner

Thanks so much for your help! I've added you as a collaborator on the project. Please make sure that you review the other/MAINTAINING.md and CONTRIBUTING.md files (specifically the bit about the commit messages and the git hooks) and familiarize yourself with the code of conduct (we're using the contributor covenant). You might also want to watch the repo to be notified when someone files an issue/PR. Please continue to make PRs as you feel the need (you can make your branches directly on the repo rather than your fork if you want). Thanks! And welcome to the team :)

@Ailrun
Copy link
Collaborator Author

Ailrun commented Apr 23, 2018

@kentcdodds Oh, I missed that. Thank you for notifying me! I will add it after busy days...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support expect matchers on value field
2 participants