-
Notifications
You must be signed in to change notification settings - Fork 648
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
Collection assertions #2695
Collection assertions #2695
Conversation
Any feedback on the naming of I would ideally have liked to use |
I don't like the name
|
Maybe I agree it would be nice to offer both a complete match opportunity, and a subset match.. Perhaps it would also be nice to be able to specify if they shouold exist in order or not.. |
shouldPassEach
shouldApplyInOrder
shouldAssertEach
…On Tue, 30 Nov 2021 at 13:12, Emil Kantis ***@***.***> wrote:
shouldAssert means the matcher would be named assert? I think that might
be confusing?
Maybe shouldFullyMatch, shouldPartiallyMatch? 🤔
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2695 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFVSGU57C6LJW63VH36DQ3UOUOY5ANCNFSM5JACH4QQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Matchers would then be Do you prefer another verb? |
I think those names should good, and maybe shouldMatchInOrderWithoutGaps could be shouldMatchInOrderSubset |
@Kantis can you rebase whenever you're able :) |
@Kantis do you have time to finish this up for 5.1 release this week? |
I'll try ✌🏼 Sorry for not responding for a while, I mentally checked out over the holidays |
So did I. Was wonderful :)
…On Wed, 12 Jan 2022 at 08:06, Emil Kantis ***@***.***> wrote:
@Kantis <https://github.com/Kantis> do you have time to finish this up
for 5.1 release this week? If not I can move to 5.2
I'll try ✌🏼 Sorry for not responding for a while, I mentally checked out
over the holidays
—
Reply to this email directly, view it on GitHub
<#2695 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFVSGWA74CZG7PHDK7RJH3UVWDHLANCNFSM5JACH4QQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
…d to include gaps. Re-use same solution for both so we get a helpful error message in both cases
…hers. Improved wording a bit
… of matchEach. Hopefully fixes test failing on ubuntu. Also conform to how index is shown for other failures
@sksamuel this one's ready ✌🏼 |
It's been a while :) |
Highlights:
shouldExist
in favor offorAny
forSingle
inspector, that asserts that a collection has a single element, which matches the assertionexistInOrder
matchermatchEach
1:1 match element:assertionmatchInOrder
assert in order, with no gapsmatchInOrderSubset
assert in order, gaps allowed