-
Notifications
You must be signed in to change notification settings - Fork 75
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
Finds files, but says "0 passing" tests #48
Comments
Unfortunately not.
Everything looks good to me. Can you provide me an failing example? |
I also have this problem |
I'm experiencing the same issue when using I suspect that it might fail because all files have a |
I had this problem when attempting to use brace expansion. For example, to find all The fix for me was to put the period outside of the braces. |
I'm having the same problem, even if the file I'm pointing to is empty. It complains if the file doesn't exist, but it doesn't actually seem to execute anything inside the file. |
I had this problem when running from the command line. The fix for me was to make sure I had quotes around my file glob. Eg, Doesn't work
Did work
|
All issues mentioned in this thread (except the terminal quotes) will be fixed with 1.0.0. |
As mentioned in the linked dola/mocha-webpack-fail#1 this seems to solve it:
|
I just installed mocha-webpack but it's not working yet. still saying "0 passing (0 ms)". |
I am also facing the same issue. |
This is happening to me even for a file that does not exists.
|
I was seeing this issue, but in my case the fix was different. I was trying to set up some a variable that would be used in several It would be nice to have a warning when passing a promise to To sum up, this fails: describe('availableDevices', async () => {
const fakeFfmpegOutput = async () => `
ffmpeg version N-89524-g74f408c-tessus Copyright (c) 2000-2017 the FFmpeg developers
... lots of lines cut here ...
: Input/output error`;
const devices = await availableDevices(fakeFfmpegOutput);
it('Excludes cameras from the list', () => {
expect(_.map(devices, 'deviceId')).to.not.include.any('1', '2');
}); but this works: describe('availableDevices', () => {
const fakeFfmpegOutput = async () => `
ffmpeg version N-89524-g74f408c-tessus Copyright (c) 2000-2017 the FFmpeg developers
... lots of lines cut here ...
: Input/output error`;
it('Excludes cameras from the list', async () => {
const devices = await availableDevices(fakeFfmpegOutput);
expect(_.map(devices, 'deviceId')).to.not.include.any('1', '2');
}); I take from this that if the callback to |
Just in case someone else has this issue and the above fixes don't work. I'm sharing a webpack config between my normal build and the unit tests and I had |
@Nulifier you saved my life! <3 |
This here deserves more praise!
So, to sum it up: Your describe blocks should not take async functions |
Finally got my mocha-webpack setup to parse my es6 etc.
My package.json contains:
But when I run it, I get:
I've tried specifying a single file but get the same output:
Lastly, if I ask it to run a missing test, now i see that the file is missing.
This makes me think I'm not doing something to "register" my tests, somehow? Here are the contents of
tests/js/components/content_type_select.test.js
:There isn't a debug or verbose flag in --help. I'd love to see if it's seeing & disregarding my files/tests, or what...
Any ideas?
The text was updated successfully, but these errors were encountered: