-
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
Fix default helper files glob to cover helper files inside subdirectories #1320
Conversation
I'm not sure about this… we already have issues with helper globbing performance (#1288). Helper exclusion isn't great either (#909). Perhaps we should solve those problems first. Just spitballing here, but what if:
This wouldn't really help your use case, but I think it makes test file matching more understandable. We could then add support for helper patterns, so you can match those and we transpile them. A utility command that prints out what files are matched and how they're treated would also be useful. |
@novemberborn: I've read the discussions and I'm not sure if I understood the problem correctly, but the issue with #1288 is because of number of files and not globbing itself, right? Because, ATM in my case, if I rename everything inside my ATM,
That would be great in the future 🙂 |
I think it's because of the I'm not saying this PR isn't an improvement, it's just that the whole helper story is a bit of a mess and I'm not sure whether we should add more twists to it. |
I'm also concerned about the performance implications of this.
@novemberborn How is this different from how it already works? Or do you mean the ability to do |
@sindresorhus uhm, I hadn't even thought of it like that. I guess if you don't use a pattern it could be used as-is…? Probably easier to never treat any |
This approach seems to slow down my AVA runs a lot, I think it descends into my How about not scanning for helper files, but instead somehow intercepting the |
I just went into the module, prepended the helper globs with my source dirs (e.g. |
@wmertens is this a comment on this PR, or AVA's current behavior?
This is tricky to do performantly at the moment. Let's move the performance discussion to #1228 (comment). |
I still don't think adding more patterns is the right answer here. Improving the @grvcoelho #1319 is valid though. I'm sorry this is taking so long. |
Description
When we have a
helpers
folder inside a subdirectory (e.g:test/unit/helpers
), the helper files are not transpiled by Ava.This PR fixes the glob that finds the defaultHelperFiles to cover subdirectories as well.
Related
This fixes #1319