-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Allow destructuring of assertions #551
Comments
Why would you use that? It's more verbose than |
For a single assertion yes, but it would be a nicer when multiple assertions are used multiple times in the same test. |
And while this test is trivial I like how it makes immediately clear what assertions I'm using. |
We'll consider it, but this honestly feels like just using a new language feature for the sake of it, rather than actually being beneficial. It also IMHO makes tests look more noisy and inconsistent.
I don't see any benefit of knowing that up front. |
I may have been too used to it. Anyway, it means losing the |
|
Add |
I think this should just be closed. Allowing this would require significant effort for |
Any chance we could import the assertion functions from ava so there is no need for the |
No, the |
Destructuring From the
I don't think that applies to AVA tests. Closing this because the effort required isn't worthwhile. |
Bound methods would allow to destructure assertions while waiting for something like tc39/proposal-bind-operator#5 to happen.
The text was updated successfully, but these errors were encountered: