-
-
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
multiple calls to done() doesn't always fail if second done is called async #4151
Labels
Comments
boneskull
added
type: bug
a defect, confirmed by a maintainer
area: async
related to asynchronous use of Mocha
labels
Jan 13, 2020
boneskull
added a commit
that referenced
this issue
Jan 14, 2020
- added a method in `errors` module to create a "multiple done" err - modernize `multiple-done.spec.js` - refactor errors into constants in `errors` module - remove `Runner#started` prop; replace with `Runner#state` prop + constants - add a catchall `createFatalError()` function to `errors` module; this is called when a test fails twice by other means (unsure what those means are yet)
boneskull
added a commit
that referenced
this issue
Jan 14, 2020
- added a method in `errors` module to create a "multiple done" err - modernize `multiple-done.spec.js` - refactor errors into constants in `errors` module - remove `Runner#started` prop; replace with `Runner#state` prop + constants - add a catchall `createFatalError()` function to `errors` module; this is called when a test fails twice by other means (unsure what those means are yet)
boneskull
added a commit
that referenced
this issue
Jan 14, 2020
- added a method in `errors` module to create a "multiple done" err - modernize `multiple-done.spec.js` - refactor errors into constants in `errors` module - remove `Runner#started` prop; replace with `Runner#state` prop + constants - add a catchall `createFatalError()` function to `errors` module; this is called when a test fails twice by other means (unsure what those means are yet) - force color in Travis CI b/c my eyes
boneskull
added a commit
that referenced
this issue
May 13, 2020
- added a method in `errors` module to create a "multiple done" err - modernize `multiple-done.spec.js` - refactor errors into constants in `errors` module - remove `Runner#started` prop; replace with `Runner#state` prop + constants - add a catchall `createFatalError()` function to `errors` module; this is called when a test fails twice by other means (unsure what those means are yet) - force color in Travis CI b/c my eyes
boneskull
added a commit
that referenced
this issue
May 14, 2020
- added a method in `errors` module to create a "multiple done" err - modernize `multiple-done.spec.js` - refactor errors into constants in `errors` module - remove `Runner#started` prop; replace with `Runner#state` prop + constants - add a catchall `createFatalError()` function to `errors` module; this is called when a test fails twice by other means (unsure what those means are yet) - force color in Travis CI b/c my eyes
boneskull
added a commit
that referenced
this issue
May 19, 2020
- added a method in `errors` module to create a "multiple done" err - modernize `multiple-done.spec.js` - refactor errors into constants in `errors` module - remove `Runner#started` prop; replace with `Runner#state` prop + constants - add a catchall `createFatalError()` function to `errors` module; this is called when a test fails twice by other means (unsure what those means are yet) - force color in Travis CI b/c my eyes
boneskull
added a commit
that referenced
this issue
May 19, 2020
- added a method in `errors` module to create a "multiple done" err - modernize `multiple-done.spec.js` - refactor errors into constants in `errors` module - remove `Runner#started` prop; replace with `Runner#state` prop + constants - add a catchall `createFatalError()` function to `errors` module; this is called when a test fails twice by other means (unsure what those means are yet) - force color in Travis CI b/c my eyes
craigtaub
pushed a commit
that referenced
this issue
May 21, 2020
- added a method in `errors` module to create a "multiple done" err - modernize `multiple-done.spec.js` - refactor errors into constants in `errors` module - remove `Runner#started` prop; replace with `Runner#state` prop + constants - add a catchall `createFatalError()` function to `errors` module; this is called when a test fails twice by other means (unsure what those means are yet) - force color in Travis CI b/c my eyes - remove `Runner#uncaughtEnd`; move logic to `Runner#uncaught`, since we can now rely on the value of `Runner#state`. - upgrade `unexpected-eventemitter` - fix potential listener leak in `Runner#run`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Example:
The above won't fail with a nonzero exit code.
EVENT_TEST_FAIL
is emitted, but nothing is listening at this point.To address this:
Runner
must have a notion of a "stopped" stateRunner
is in the stopped state, then it must throw an exception.EVENT_RUN_END
is emitted)--and the process will fail with a bog-standard uncaught exception--Mocha will need to retain extra information in the error so the user can find which test is responsible. I'm not sure why we lose the stack trace back to the test; maybe somebody can help.Anyway, I have a fix in-progress for this.
Ref: https://twitter.com/jsumners79/status/1216391159699988481
The text was updated successfully, but these errors were encountered: