mocha-custom-stack-trace-reporter
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -9,2 +9,8 @@ "use strict"; | ||
}); | ||
runner.on("start", () => { | ||
process.on("unhandledRejection", (reason, promise) => { | ||
console.log("ERROR: the execution failed due to an unhandled promise rejection, details: %s", reason.stack || reason); | ||
process.exit(process.exitCode | 100); | ||
}); | ||
}); | ||
} | ||
@@ -11,0 +17,0 @@ static stackTrace(error) { |
{ | ||
"author": "Unscrambl", | ||
"name": "mocha-custom-stack-trace-reporter", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Expand Mocha error reports with custom stack traces", | ||
@@ -6,0 +6,0 @@ "main": "built/src/mochaCustomStackTraceReporter.js", |
# mocha-custom-stack-trace-reporter | ||
This library can be used as a mocha plug-in to report custom stack traces for errors. If the error object that escapes from a test has a 'stackTrace()' function, then this function is called to retrieve the stack trace and report it. | ||
This library can be used as a mocha plug-in to report custom stack traces for errors. If the error object that escapes | ||
from a test has a 'stackTrace()' function, then this function is called to retrieve the stack trace and report it. It | ||
also handles unhandled promise rejections and reports them along with the stack trace. |
@@ -12,2 +12,9 @@ import { reporters, Runner } from "mocha"; | ||
}); | ||
runner.on("start", () => { | ||
process.on("unhandledRejection", (reason, promise) => { | ||
console.log("ERROR: the execution failed due to an unhandled promise rejection, details: %s", reason.stack || reason); | ||
process.exit(process.exitCode | 100); | ||
}); | ||
}); | ||
} | ||
@@ -21,2 +28,2 @@ | ||
export = MochaCustomStackTraceReporter; | ||
export = MochaCustomStackTraceReporter; |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
155
6
1
18791
12