You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently apart from passing in my own files list there doesn't seem to be any way to set the helper's directory apart from overriding the whole files array. I'd like to suggest adding a way to change each of the arrays that makes up thefiles option.
This would include defaultExcludePatterns, defaultIncludePatterns and defaultHelperPatterns . My idea would be to use an object for files which has the fieldsexcludes, includes and helpers.
The reason I'm suggesting this is I want to use __helpers__ for my helper directory as I currently have a helpers directory for a test with my helpers. To add that I'd need to replace the whole files array instead of just doing something like { files: { helpers: ['**/__helpers'] } }.
The text was updated successfully, but these errors were encountered:
Adding more options is rarely a good solution. Maybe we should just use __helpers__ for helpers if you use the naming convention __tests__ for tests, like we do with snapshots.
I've been collecting these issues under the globbing label. I haven't quite summarized the solution, but I actually do think we should support separate helper patterns.
I also like the idea of supporting __helpers__.
I should have more time to work on AVA soon, and this is one of the areas I'd like to tackle. So stay tuned (but not too tuned, can't make any promises 😉 ).
Currently apart from passing in my own files list there doesn't seem to be any way to set the helper's directory apart from overriding the whole
files
array. I'd like to suggest adding a way to change each of the arrays that makes up thefiles
option.This would include
defaultExcludePatterns
,defaultIncludePatterns
anddefaultHelperPatterns
. My idea would be to use an object for files which has the fieldsexcludes
,includes
andhelpers
.ava/lib/ava-files.js
Lines 76 to 95 in 87eef84
The reason I'm suggesting this is I want to use
__helpers__
for my helper directory as I currently have ahelpers
directory for a test with my helpers. To add that I'd need to replace the whole files array instead of just doing something like{ files: { helpers: ['**/__helpers'] } }
.The text was updated successfully, but these errors were encountered: