mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
test: add undefined fatalException exit code test
Add a test that checks the exit code when _fatalException is undefined PR-URL: https://github.com/nodejs/node/pull/38119 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
committed by
James M Snell
parent
6bbe28552c
commit
c8bbd83ab2
9
test/fixtures/process-exit-code-cases.js
vendored
9
test/fixtures/process-exit-code-cases.js
vendored
@@ -122,6 +122,15 @@ function getTestCases(isWorker = false) {
|
||||
result: isWorker ? 1 : 7,
|
||||
error: /^Error: ok$/,
|
||||
});
|
||||
|
||||
function exitWithUndefinedFatalException() {
|
||||
process._fatalException = undefined;
|
||||
throw new Error('ok');
|
||||
}
|
||||
cases.push({
|
||||
func: exitWithUndefinedFatalException,
|
||||
result: 6,
|
||||
});
|
||||
return cases;
|
||||
}
|
||||
exports.getTestCases = getTestCases;
|
||||
|
||||
Reference in New Issue
Block a user