-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[WIP] Add error for suites without callback functions #3651
Conversation
lilaconlee
commented
Mar 5, 2019
•
edited by jennifer-shehane
Loading
edited by jennifer-shehane
- Fixes Crash if a "describe" block does not have a callback function #2115
- Addresses Improve Test Runner error experience #3762
This reverts commit 7a94766.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a better and more direct way to test for this. The problem is that this possibly creates an edge case where no tests have been added but not because the suite is missing a callback function. You could likely have an empty suite above the problematic one - or rather you could also have a TypeError that causes this without being directly related to the suites either.
The more solution is to override mocha's function handling of suites and detect whether fn
is undefined and immediately throw a precise error there instead of appending this to the bottom of the uncaught error.
Mocha parses the suites at a very specific (and early) time in the process and that area can be handled specifically.
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
Unfortunately we have to close this PR due to inactivity. Please open a new PR to address the original issue. |