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: support Jest asymmetric matchers #111

Merged
merged 4 commits into from
Aug 15, 2022
Merged

Conversation

m-radzikowski
Copy link
Owner

Adds support for asymmetric Jest matchers like expect.stringMatching in custom Jest matchers.

Example:

expect(snsMock).toHaveReceivedCommandWith(PublishCommand, {
    Message: expect.stringMatching(/message/)
});

Fixes #98

@codecov-commenter
Copy link

codecov-commenter commented Aug 15, 2022

Codecov Report

Merging #111 (eac04be) into main (a76b579) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main      #111   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            6         6           
  Lines          157       174   +17     
  Branches        21        24    +3     
=========================================
+ Hits           157       174   +17     
Impacted Files Coverage Δ
src/jestMatchers.ts 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@m-radzikowski m-radzikowski merged commit 3bf23ef into main Aug 15, 2022
@m-radzikowski m-radzikowski deleted the jest-matchers-asymmetric branch August 15, 2022 11:08
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.

Jest matchers don't allow use of jest submatchers for input object filtering
2 participants