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
1 changed files with 2 additions and 0 deletions

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