-
-
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
unhelpful error when describe lacks second argument #1744
Comments
Throwing a I like the idea of having |
I also find the asymmetry surprising: describe('something', function() {
xit('skip it');
});
xdescribe('something', function() {}); // works fine
xdescribe('whatever'); // throws an error |
…when not supplied with a callback (issue mochajs#1744).
+ |
Still an issue.
|
I just wasted a good amount of time trying to find out what was wrong with my tests. I had written a backbone |
@UlyssesAlves I can't recreate this behavior. What version of mocha are you running? |
@Munter I'm using Mocha version 2.5.3. Here is a snippet of a scenario which will reproduce the issue as described above:
|
In mocha 3 this is the output of the above test:
Seems to be fixed |
That's great! I'm going to update my project to the latest version of mocha then. I think @dasilvacontin (or some project member) should close the issue by now. Unless, of course, if this is still an issue for him or for someone else. |
@Munter @UlyssesAlves After reading that snippet, I was expecting to see a pending suite in the output. What about you? |
@dasilvacontin It does strike me as a bit odd that suites with no tests simply disappear completely in the output |
@dasilvacontin sure. I think it would be better to see a pending suítes report so that we don't forget that our tests are not complete yet and that we have empty describe directives which need to be filled with actual test cases. |
…when not supplied with a callback (issue #1744).
…roperty-currentretry * upstream/master: helpful error when necessary suite callback omitted; closes mochajs#1744 Fix an issue and add relevant tests when describe and xdescribe fail when not supplied with a callback (issue mochajs#1744). rename more fixtures; closes mochajs#2383 Report non-match to STDERR and exit if no files are matched (mochajs#2450) Exit process with correct error codes (mochajs#2445) fix test files not using .spec suffix fix test fixtures not using .fixture suffix always halt execution when async skip() called; closes mochajs#2465 (mochajs#2479) avoid test flake in "delay" test; closes mochajs#2469 (mochajs#2470) revert accidental change to bin paths disregard function names when testing under Node.js 6.5.0; closes mochajs#2467 (mochajs#2477) lints more files; add more files to lint check; closes mochajs#2457 adds *.orig to .gitignore Exclude the --inspect flag fix check-leaks to catch a leak whose name begins with 'd'
…-files-cache * upstream/master: attempt windows-friendly reproducible case for mochajs#2315 fix: fix uncaught TypeError if error occurs on next tick, closes mochajs#2315 (mochajs#2439) helpful error when necessary suite callback omitted; closes mochajs#1744 Fix an issue and add relevant tests when describe and xdescribe fail when not supplied with a callback (issue mochajs#1744). rename more fixtures; closes mochajs#2383 Report non-match to STDERR and exit if no files are matched (mochajs#2450) Exit process with correct error codes (mochajs#2445) fix test files not using .spec suffix fix test fixtures not using .fixture suffix always halt execution when async skip() called; closes mochajs#2465 (mochajs#2479) avoid test flake in "delay" test; closes mochajs#2469 (mochajs#2470) revert accidental change to bin paths disregard function names when testing under Node.js 6.5.0; closes mochajs#2467 (mochajs#2477) lints more files; add more files to lint check; closes mochajs#2457 adds *.orig to .gitignore Exclude the --inspect flag fix check-leaks to catch a leak whose name begins with 'd'
…when not supplied with a callback (issue mochajs#1744).
The text was updated successfully, but these errors were encountered: