-
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
Support new test file conventions #71
Support new test file conventions #71
Conversation
filename: toPath('lib/foo.test.js'), | ||
errors: [{message: 'Test file is ignored because it is not in `test.js test-*.js test/**/*.js`'}] | ||
filename: toPath('lib/foo.spec.js'), | ||
errors: [{message: 'Test file is ignored because it is not in `test.js test-*.js test/**/*.js **/__tests__/** **/*.test.js`'}] |
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.
**/__tests__/**
--> **/__tests__
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.
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.
aae72f2
to
d1b2237
Compare
Let's wait until avajs/ava#721 gets merged, but LGTM at the moment :) |
@@ -8,7 +8,9 @@ var createAvaRule = require('../create-ava-rule'); | |||
var defaultFiles = [ | |||
'test.js', | |||
'test-*.js', | |||
'test/**/*.js' | |||
'test/**/*.js', | |||
'**/__tests__', |
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.
Should be **/__tests__/**/*.js
as this plugin doesn't have directory recursion like AVA.
@kentcdodds We must also add in the documentation no-ignored-test-files.md, replace: By default, it will search in `test.js test-*.js test/**/*.js`, which you can override by specifying a path when launching AVA or in the [AVA configuration in the `package.json` file](https://github.com/sindresorhus/ava#configuration). By: By default, it will search in `test.js test-*.js test/**/*.js **/__tests__/**/*.js **/*.test.js`, which you can override by specifying a path when launching AVA or in the [AVA configuration in the `package.json` file](https://github.com/sindresorhus/ava#configuration). |
This PR has been updated based on feedback :-) |
Thanks @kentcdodds 🎉 |
avajs/ava#721