Skip beforeShutdown in test

This commit is contained in:
mei23 2021-06-04 14:49:01 +09:00
parent 04d2415eb8
commit 79c33ab536
No known key found for this signature in database
GPG key ID: DD8628500D3E4B23

View file

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