-
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
Harmonize test file & source pattern handling #736
Comments
I think the source file pattern should be made to match the test file pattern.
Aren't you doing exactly that (overriding the defaults) in #614? |
Yea maybe. Here's the list of source excludes.
Yes, but that's based on the path prefix. So Maybe we should move all this manipulation code into an external library. |
Why? |
@jamestalmage it's a fairly generic name when ignoring deeply nested directories. I doubt anybody would put legitimate code in say |
For example if you mimick your |
@novemberborn Exactly this example is occurring in my project. Is there any way to bypass this? |
@buzinas not currently, no. You'll have to pick a different directory name. |
Currently this prevents tests from being shared through an npm package. Specifying an explicit |
There's more discussion in this PR: #1320 (comment) At this point we're looking for help in summarizing the discussion into an actionable proposal, and then writing the code. |
Handling of test file patterns should be harmonized with how source patterns are handled (#614):
files
is empty, or if it only contains negated patternsThe 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?Should we change the source exclusion patterns? Or do those make more sense relative to the current working directory?
Implementation wise I think we can move the file selection tests in
test/api.js
to a newtest/ava-files.js
test file. We can set up a fixture directory to exercise the globbing behavior.The text was updated successfully, but these errors were encountered: