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) {