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

New Assertion API #2

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

New Assertion API #2

wants to merge 2 commits into from

Conversation

mindplay-dk
Copy link
Owner

Experimental (BREAKING) API change:

  • would allow assertions to log more than one Fact
  • potentially (not implemented) allows for async assertions.

@mindplay-dk
Copy link
Owner Author

@dimatakoy Well, as you can see, I didn't go ahead with these changes, because I wasn't sure I wanted to add that complexity. I think there would be simpler ways to add support for async assertions, which was the primary motivation for this attempted change.

I want something that's really open-ended, unopinonated, and easy to explain - for the most part that just means using functions with one responsibility, as opposed to objects with multiple different methods.

I'm not sure what you want this "meta" stuff for - you're kind of going straight for the "what" without really explaining "why", so I'm not really following what it is you're trying to achieve.

By better error reporting, you mean assertions could include information from context? Context is just there to provide a means of getting dependencies to your test implementations. Assertions shouldn't be coupled to context, I don't think - it's an optional test implementation detail, just a very small utility that lets you reuse test subject bootstrapping. If that makes sense? 🙂

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.

1 participant