{"action":"opened","issue":{"url":"https://api.github.com/repos/sindresorhus/ava/issues/736","repository_url":"https://api.github.com/repos/sindresorhus/ava","labels_url":"https://api.github.com/repos/sindresorhus/ava/issues/736/labels{/name}","comments_url":"https://api.github.com/repos/sindresorhus/ava/issues/736/comments","events_url":"https://api.github.com/repos/sindresorhus/ava/issues/736/events","html_url":"https://github.com/sindresorhus/ava/issues/736","id":146586086,"number":736,"title":"Harmonize test file & source pattern handling","user":{"login":"novemberborn","id":33538,"avatar_url":"https://avatars.githubusercontent.com/u/33538?v=3","gravatar_id":"","url":"https://api.github.com/users/novemberborn","html_url":"https://github.com/novemberborn","followers_url":"https://api.github.com/users/novemberborn/followers","following_url":"https://api.github.com/users/novemberborn/following{/other_user}","gists_url":"https://api.github.com/users/novemberborn/gists{/gist_id}","starred_url":"https://api.github.com/users/novemberborn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novemberborn/subscriptions","organizations_url":"https://api.github.com/users/novemberborn/orgs","repos_url":"https://api.github.com/users/novemberborn/repos","events_url":"https://api.github.com/users/novemberborn/events{/privacy}","received_events_url":"https://api.github.com/users/novemberborn/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sindresorhus/ava/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/sindresorhus/ava/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-07T11:17:26Z","updated_at":"2016-04-07T11:17:26Z","closed_at":null,"body":"Handling of test file patterns should be harmonized with how source patterns are handled (#614):\r\n\r\n* Use the default patterns if `files` is empty, *or* if it only contains negated patterns\r\n* Apply specified negated patterns together with the default exclusion patterns\r\n* Allow specified patterns to override the default exclusion patterns\r\n\r\nThe default exclusion patterns for source files are relative to the current working (`node_modules/**/*`) however the test file exclusion patterns can apply anywhere (`**/node_modules/**`). I guess that makes sense, though I'm not sure how to override the default exclusion patterns. Maybe that's not necessary for test files?\r\n\r\nShould we change the source exclusion patterns? Or do those make more sense relative to the current working directory?\r\n\r\n---\r\n\r\nImplementation wise I think we can move the file selection tests in `test/api.js` to a new `test/ava-files.js` test file. We can set up a fixture directory to exercise the globbing behavior."}}