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

Implement SatisfyAllOf matcher #511

Merged
merged 4 commits into from
Apr 10, 2018
Merged

Implement SatisfyAllOf matcher #511

merged 4 commits into from
Apr 10, 2018

Conversation

wongzigii
Copy link
Member

@wongzigii wongzigii commented Apr 3, 2018

Address #503

Add SatisfyAllOf matcher and && operator to extend the existed SatisfyAnyOf and || matcher, since the allPass matcher can only predicate one condition for each.

expect(false).toNot(satisfyAllOf(beFalse()))
}
failsWithErrorMessage(
"expected to not match all of: {be greater than <10.5>}, and {be less than <100.75>}, and {be close to <50.1> (within 0.0001)}, got 50.10001") {

Choose a reason for hiding this comment

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

Line Length Violation: Line should be 120 characters or less: currently 152 characters (line_length)

expect(2).to(satisfyAllOf(equal(3), equal(4), equal(5)))
}
failsWithErrorMessage(
"expected to match all of: {all be less than 4, but failed first at element <5> in <[5, 6, 7]>}, and {equal <[5, 6, 7]>}, got [5, 6, 7]") {

Choose a reason for hiding this comment

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

Line Length Violation: Line should be 120 characters or less: currently 147 characters (line_length)

@DanielAsher
Copy link

DanielAsher commented Apr 4, 2018

@wongzigii Cool!

Copy link
Member

@ikesyo ikesyo left a comment

Choose a reason for hiding this comment

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

LGTM 👏

@ikesyo ikesyo merged commit eb18dce into Quick:master Apr 10, 2018
@wongzigii wongzigii deleted the satisfyAllOf branch April 10, 2018 15:08
Megal pushed a commit to Megal/Nimble that referenced this pull request Jul 31, 2019
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.

4 participants