-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Sub folders ignored (even with --recursive
) when tests present in parent folder
#2138
Comments
Kind of the same for me, but in the opposite order. Only the tests in the sub folders were executed ( Thanks for pointing a fix out, surrounding the path with quotes fixed the issue. |
Running into this as well. |
I am a bot that watches issues for inactivity. |
This is Posix shells expanding the path before passing it to Mocha; if they're not configured to treat |
Had exactly same issue on Mac and adding single quotes around path after |
Unfortunately, this fix does not work cross-platform. On Windows: On Mac: Keep trying! |
@mscottx88 Does replacing |
Yes it does :) That is the cross-platform solution we needed!
Windows & Mac 👍 👍 |
I just came across this issue and for others that might find it too, I can confirm surrounding the path with double quotes solved the issue for me too (on mac). |
Doesn't work on Bash on Linux. GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu) |
Working on Bash on Ubuntu 20.04: |
I'm encountering a strange issue, which I assume is a bug.
The relevant folder structure looks roughly like this:
My
mocha.opts
contains the following:And I am running Mocha using an NPM run script, using:
This was working fine as long as I only had tests in the
shared/helpers
folder. The moment I created a.spec.js
file in theshared
folder itself, the tests fromshared/helpers
were no longer executed.I found a fix for this on StackOverflow, which recommended putting the tests command in a string, like so:
However, not sure if that's an artefact of npm or an issue with Mocha.
I also tried to put
app/**/*.spec.js
as the last parameter inmocha.opts
, but that had the same effect, and putting quotes around it in there caused Mocha to crash.If any more information is required to reproduce/debug this please let me know.
The text was updated successfully, but these errors were encountered: