From 380494f0226052ced2918bfdbbac76cf87788a95 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Mon, 10 Jun 2019 18:26:43 +0200 Subject: [PATCH] test: make sure test function resolves in test-worker-debug Use the common `.then(common.mustCall())` check to verify that. Also, we should not use `process.abort()` in `test/parallel`; if the test fails, that leaves core dumps lying around on POSIX systems. PR-URL: https://github.com/nodejs/node/pull/28155 Reviewed-By: Colin Ihrig Reviewed-By: Trivikram Kamat Reviewed-By: Luigi Pinca Reviewed-By: Richard Lau Reviewed-By: Rich Trott Reviewed-By: James M Snell --- test/parallel/test-worker-debug.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-worker-debug.js b/test/parallel/test-worker-debug.js index b67eb5ef403d6f..2629af8cb32e37 100644 --- a/test/parallel/test-worker-debug.js +++ b/test/parallel/test-worker-debug.js @@ -272,7 +272,7 @@ async function testWaitForDisconnectInWorker(session, post) { session.disconnect(); console.log('Test done'); -})().catch((err) => { +})().then(common.mustCall()).catch((err) => { console.error(err); - process.abort(); + process.exitCode = 1; });