-
-
Notifications
You must be signed in to change notification settings - Fork 214
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
Add toInclude #85
Add toInclude #85
Conversation
Looks good @grug just need to rebase master back into your branch 😄 |
Codecov Report
@@ Coverage Diff @@
## master #85 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 48 50 +2
Lines 216 225 +9
Branches 30 31 +1
=====================================
+ Hits 216 225 +9
Continue to review full report at Codecov.
|
Awesome. I think I've rebased that correctly. Let me know if you need anything else for this PR to be merged :) |
src/matchers/toInclude/index.js
Outdated
|
||
import predicate from './predicate'; | ||
|
||
const passMessage = (actual, expected) => () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noticed this function isn't returning the message if you remove the curly braces it should fix this snapshot:
exports[`.toInclude .not.toInclude fails when a string does have a given substring 1`] = `"<red>No message was specified for this matcher.</>"`;
const passMessage = (actual, expected) => () =>
matcherHint('.not.toInclude') +
'\n\n' +
'Expected string to not include:\n' +
` ${printExpected(expected)}\n` +
'Received:\n' +
` ${printReceived(actual)}`;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup I'll fix that now
Okay - I've fixed up the changes you've suggested :) let me know if I should do anything else before this can be merged. |
Good job @grug thanks! |
What
Add
toInclude
matcher.Why
Closes #41
Notes
Housekeeping
yarn contributor
)