-
Notifications
You must be signed in to change notification settings - Fork 10
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: Add each-assertions. #408
Conversation
The order of the assertions when building up the assert function was wrong. It is now ordered from less specific to more specific, so that the most specific assertions are always used.
This includes a major rewrite of the types and structure of the top level assert.that function to achieve re-use of the existing assertions and keep outward type-safety. This unfortunately breaks the internal type-safety of assertthat and makes maintenance of the combined assertions harder.
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 two super-small issues in the documentation (oh, and: I think we need to update the LICENSE.txt
file to 2022, which is not (yet) part of this pull request, don't we?)
Co-authored-by: Golo Roden <golo.roden@thenativeweb.io>
@yeldiRium Basically, I'm fine with this 👍 Besides that, from my POV, we're good to go 😊 |
@goloroden I've seen it now and bumped the year to 2022 :) |
@yeldiRium Thanks 😊 From my side, this is fine. I've approved the PR, but didn't want to merge it, because I did not know whether you wanted to also have feedback from someone else. If you are fine with this, please feel free to merge. 😊 |
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.
Implementation wise, there's just one small thing. Regarding the API, I have my concerns, please see below.
Maybe changing the API as described in my comment will improve the type safety, too?
lib/assertions/combined/negated/assertActualIsNotThrowingAsync.ts
Outdated
Show resolved
Hide resolved
Awesome 😍 |
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.
@yeldiRium The changes look really great 👍
However, the documentation is not yet up-to-date (although this is just a small change). Could you please adjust this?
# [6.5.0](6.4.0...6.5.0) (2022-03-22) ### Features * Add each-assertions. ([#408](#408)) ([0bcaac6](0bcaac6))
This includes a major rewrite of the types and structure of the top
level assert.that function to achieve re-use of the existing assertions
and keep outward type-safety.
This unfortunately breaks the internal type-safety of assertthat and
makes maintenance of the combined assertions harder.