Open fedulovivan opened 4 years ago
Yes, you are correct.--recursive
is not working as expected.
Currently it's working only for directories:
mocha --recursive "./test"
extension
setting: it should return all files in (./test
and subdirectories) with defined extension(s).You can set the extensions via CLI --extension
or via configuration file.
Unfortunately our dependency glob does not offer any option for walking subdirectories, except the globstar **
. So there is no trivial fix for this issue.
@juergba Am I right, that passing directory along with extension as ./test/*.js* does not make any sense? So the .js** part is just ignored?
And thanks for pointing to extension option. --extension ts,js
is exactly what was needed.
So the *.js part is just ignored?
You are welcome. Yes, it does not make any sense/has no effect.
But it's the --recursive
flag which is just ignored when you run mocha --recursive "./test/*.js"
.
The same for mocha --recursive "./test/*.ts"
.
The extension does not make any difference (regarding the bug) in these cases.
Im still experiencing this issue
If we need to grab all *.ts files from certain directory the only workaround is usage of bash globstar option:
Following is not working:
Note, that for *.js files both are working well:
Tested with latest 6.* version v6.2.2