-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Make AVA display subdirs properly and be recursive by default. #373
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
Changes from all commits
4b14652
64c0989
388558d
1f51b57
30433e4
c59e771
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,14 +115,15 @@ $ ava --help | |
ava | ||
ava test.js test2.js | ||
ava test-*.js | ||
ava test | ||
ava --init | ||
ava --init foo.js | ||
|
||
Default patterns when no arguments: | ||
test.js test-*.js test/*.js | ||
test.js test-*.js test/**/*.js | ||
``` | ||
|
||
Files in directories named `fixtures` and `helpers` are ignored, as well as files starting with `_`. This can be useful for having helpers in the same directory as your test files. | ||
Directories are recursive by default. Files in directories named `fixtures` and `helpers` are ignored, as well as files starting with `_`. This can be useful for having helpers in the same directory as your test files. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This could be explained better. Not clear what it means. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sindresorhus: Sorry, I'm really terrible with wording. Would something like "Directories will be expanded recursively" be better? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not totally happy with this, but something like:
You also need to update the globbing pattern in the CLI help output (and the identical output in the readme). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sindresorhus: But that doesn't really indicate that any directories that you pass it, nor does it include the bit about fixtures and helpers or underscores. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ariporad Good point, should include that too. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sindresorhus: Maybe something like
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
|
||
*WARNING: NON-STANDARD BEHAVIOR:* The AVA CLI will always try to find and use your projects local install of AVA. This is true even when you run the global `ava` command. This non-standard behavior solves an important [issue](https://github.com/sindresorhus/ava/issues/157), and should have no impact on everyday use. | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import test from '../../../'; | ||
|
||
test('subdir fail', t => { | ||
t.fail(); | ||
}); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use ES2015 syntax like the other test fixtures. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import test from '../../../'; | ||
|
||
test('subdir', t => { | ||
t.pass(); | ||
}); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use ES2015 syntax like the other test fixtures. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import test from '../../../../'; | ||
|
||
test('subdir', t => { | ||
t.pass(); | ||
}); |
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.
Actually, the change to this array is wrong.
It should match
test.js
andtest-*.js
in root, and any JS file recursively intest
folder as long as it's not prefixed with an underscore.