-
-
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
Warning: Could not find any test files matching pattern: #2895
Comments
You should be writing (Mocha supports putting your test files in other folders than |
In my project:
When i run
|
It looks like mocha is including the single quotes in the pattern itself. I was able to get around it by using escaped double quotes:
|
Hi ! I have same issue, but here with Circle CI 2.0 (Ubuntu 14.04) Works fine on MacOSX and Ubuntu 16.04, how could i solve this error with Circle CI environment ? Seems to be a Mocha trick... Thanks a lot ! In my term :
My package.json :
|
I have a similar issue :
Doesn't work.
(notice the |
@xurei's is the only thing I've seen here that could be an actual Mocha bug. I'll try to reproduce this. |
@xurei What shell are you using? If you're in PowerShell, glob (which interprets your glob-containing path, because it's in double-quotes) expects your paths to look like your second example; the first example is not a valid path, AFAICT. If you're in bash on Windows, then either should work, at least in my limited testing. |
@boneskull I'm using Git BASH |
My
And, of course, I'm currently in the root directory where the server directory is located, but when I run |
@MuhammadJamaluddin, you should be able to just have: "scripts": {
"test": "mocha server/spec/server-spec.js"
} Depending on what version of mocha you're using, you may see something helpful in the debug output by using $ npm install --save-dev cross-env "scripts": {
"test": "cross-env DEBUG=* mocha server/spec/server-spec.js"
} Or use a glob and just see what mocha finds... JIC you misspelled something... "scripts": {
"test": "cross-env DEBUG=* mocha 'server/**/*.js'"
} |
Why the plugin doesn't see files when files 100% exist in my
test
folder?I want to run test for certain files only.
How do I do it with
mocha
?My set up:
None of these work. All throw the same error:
Error:
How it can be? No
test files matching pattern
? It is not even a pattern! It is exactly a file name.How to run it?
The text was updated successfully, but these errors were encountered: