From 79c33ab53615e8fa4820d2abfc2494cba55c441c Mon Sep 17 00:00:00 2001 From: mei23 Date: Fri, 4 Jun 2021 14:49:01 +0900 Subject: [PATCH] Skip beforeShutdown in test --- src/misc/before-shutdown.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/misc/before-shutdown.ts b/src/misc/before-shutdown.ts index 8639d42b04..33abf5fb4d 100644 --- a/src/misc/before-shutdown.ts +++ b/src/misc/before-shutdown.ts @@ -56,6 +56,8 @@ const forceExitAfter = timeout => () => { * @param {string} signalOrEvent The exit signal or event name received on the process. */ async function shutdownHandler(signalOrEvent) { + if (process.env.NODE_ENV === 'test') return process.exit(0); + console.warn(`Shutting down: received [${signalOrEvent}] signal`); for (const listener of shutdownListeners) {