Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

fix: closes #5115 (#5116)

Lucas Lopesa2e600d70f4d
diff --git a/lib/reporters/base.js b/lib/reporters/base.js
index 5af6e7bd..e0ca5f48 100644
--- a/lib/reporters/base.js
+++ b/lib/reporters/base.js
@@ -227,7 +227,7 @@ var generateDiff = (exports.generateDiff = function (actual, expected) {
* @private
* @param {Error} err
* @param {Set<Error>} [seen]
- * @return {{ message: string, msg: string, stack: string }}
+ * @return {FullErrorStack}
*/
var getFullErrorStack = function (err, seen) {
if (seen && seen.has(err)) {
@@ -580,3 +580,12 @@ function sameType(a, b) {
Base.consoleLog = consoleLog;
Base.abstract = true;
+
+/**
+ * An object with all stack traces recursively mounted from each err.cause
+ * @memberof module:lib/reporters/base
+ * @typedef {Object} FullErrorStack
+ * @property {string} message
+ * @property {string} msg
+ * @property {string} stack
+ */