mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
tests: Assume failure in case the async task vanishes.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
16ac3c019a
commit
b248e2d931
@@ -101,6 +101,10 @@ async function run_one_module(file) {
|
||||
|
||||
test.set_verbose(files.length === 1);
|
||||
|
||||
// In case someone mistakenly vanishes the async task with something like `await
|
||||
// new Promise(() => {})`, assume failure until we establish otherwise.
|
||||
process.exitCode = 1;
|
||||
|
||||
(async () => {
|
||||
let exit_code = 0;
|
||||
|
||||
@@ -144,8 +148,7 @@ test.set_verbose(files.length === 1);
|
||||
namespace.finish();
|
||||
}
|
||||
|
||||
process.exit(exit_code);
|
||||
process.exitCode = exit_code;
|
||||
})().catch((error) => /* istanbul ignore next */ {
|
||||
console.error(error);
|
||||
process.exit(1);
|
||||
});
|
||||
|
Reference in New Issue
Block a user