-
Notifications
You must be signed in to change notification settings - Fork 49
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
Handle destructured import of a test modifier #121
Comments
Are there any other methods that are aliases to import {cb as test} from 'ava';
test(...); is that equivalent to import test from 'ava';
test.cb(...); or is |
All methods can be destructured and will work as expected, all the following are valid:
You could even try something like this for a mocha-like interface: import {beforeEach, afterEach, cb as it} from 'ava';
beforeEach(t => {...});
it('does things', t => {...}); Most of our rules should try and support all of those. We can update the |
An idea for an other time, but maybe we could have an option in |
By the way, this looks a lot like what I did in eslint-plugin-lodash-fp. Starting to think we could maybe make a separate "enhancer" for this using enhance-visitor. Just to do the import logic understanding as in the lodash-fp link, and then we'll have to update the rules to use that. |
Much of the static-analysis work is already complete in |
@IssueHunt has funded $80.00 to this issue.
|
@sindresorhus has rewarded $72.00 to @alexzherdev. See it on IssueHunt
|
From sindresorhus/conf#2 (comment)
I think we should handle the following cases:
It's a useful pattern to make a test file with only serial tests.
IssueHunt Summary
alexzherdev has been rewarded.
Backers (Total: $80.00)
Submitted pull Requests
Tips
IssueHunt has been backed by the following sponsors. Become a sponsor
The text was updated successfully, but these errors were encountered: