You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 3, 2025. It is now read-only.
I guess ultimately what I'm trying to avoid is having to define a local interim variable that is then passed to shouldThrow. I think one of these two approaches would avoid some of the variable noise in tests.
I really like that idea, as it reduces the noise in tests.
Can the providedWith function work with an arbitrary number of parameters?
If not I would prever the second version.
The second version also doesn't abstract away the function call which makes it a bit clearer what is tested.
If you like, send a PR 👍
As an alternative syntax to:
It would be really nice to add function reference syntax such as:
::myThrowingFunction shouldThrow AnyException
If the function takes in an argument it would then be:
I've hacked these implementations in my own project as:
I would be happy to clean it up, and submit a formal PR if this sort of feature interests you.
Thanks!
The text was updated successfully, but these errors were encountered: