fix(testreporter): Test Reporter should not terminate node.js process (#4716)
This patch starts assigning process exit codes rather than terminating parent process. Library should never own/terminate parent node.js process.
This commit is contained in:
parent
eea55bd6c6
commit
934d73e526
@ -80,13 +80,13 @@ class Reporter {
|
||||
description = `${RED_COLOR}<UNKNOWN>${RESET_COLOR}`;
|
||||
console.log(` ${workerId}: [${description}] ${test.fullName} (${formatTestLocation(test)})`);
|
||||
}
|
||||
process.exit(2);
|
||||
process.exitCode = 2;
|
||||
}
|
||||
|
||||
_onFinished() {
|
||||
this._printTestResults();
|
||||
const failedTests = this._runner.failedTests();
|
||||
process.exit(failedTests.length > 0 ? 1 : 0);
|
||||
process.exitCode = failedTests.length > 0 ? 1 : 0;
|
||||
}
|
||||
|
||||
_printTestResults() {
|
||||
|
Loading…
Reference in New Issue
Block a user