{"record":{"id":"aaf57d1f13cab24e","repo":"mochajs/mocha","slug":"err-mocha-fatal-aaf57d","errorCode":"ERR_MOCHA_FATAL","errorMessage":"Test failed after root suite execution completed!","messagePattern":"Test failed after root suite execution completed!","errorType":"exception","errorClass":"FatalError","httpStatus":null,"severity":"error","filePath":"lib/runner.cjs","lineNumber":542,"sourceCode":" * - Failed `after each` hook skips remaining tests in a\n *   suite and subsuites, but executes other `after each`\n *   hooks\n *\n * @private\n * @param {Runnable} test\n * @param {Error} err\n * @param {boolean} [force=false] - Whether to fail a pending test.\n */\nRunner.prototype.fail = function (test, err, force) {\n  force = force === true;\n  if (test.isPending() && !force) {\n    return;\n  }\n  if (this.state === constants.STATE_STOPPED) {\n    if (err.code === errorConstants.MULTIPLE_DONE) {\n      throw err;\n    }\n    throw createFatalError(\n      \"Test failed after root suite execution completed!\",\n      err,\n    );\n  }\n\n  ++this.failures;\n  debug(\"total number of failures: %d\", this.failures);\n  test.state = STATE_FAILED;\n\n  if (!isError(err)) {\n    err = thrown2Error(err);\n  }\n\n  // Filter the stack traces\n  if (!this.fullStackTrace) {\n    const alreadyFiltered = new Set();\n    let currentErr = err;\n","sourceCodeStart":524,"sourceCodeEnd":560,"githubUrl":"https://github.com/mochajs/mocha/blob/6bcbee4fd9a95351cedf0fdcb14c7d696486bc5a/lib/runner.cjs#L524-L560","documentation":"Error \"Test failed after root suite execution completed!\" thrown in mochajs/mocha.","triggerScenarios":"Thrown at lib/runner.cjs:542 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6bcbee4fd9a95351cedf0fdcb14c7d696486bc5a","analyzedAt":"2026-09-01T03:41:47.182Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}