From 1c649f974ef55108d0a8633c8a271d46a97c29da Mon Sep 17 00:00:00 2001 From: Conduitry Date: Thu, 30 Sep 2021 00:06:56 -0400 Subject: [PATCH] remove unhandledRejection handler when runtime tests are done --- test/runtime/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/runtime/index.ts b/test/runtime/index.ts index ff6d1039d3..98d25e79a6 100644 --- a/test/runtime/index.ts +++ b/test/runtime/index.ts @@ -25,12 +25,13 @@ let compile = null; const sveltePath = process.cwd().split('\\').join('/'); let unhandled_rejection = false; -process.on('unhandledRejection', err => { +function unhandledRejection_handler(err) { unhandled_rejection = err; -}); +} describe('runtime', () => { before(() => { + process.on('unhandledRejection', unhandledRejection_handler); svelte = loadSvelte(false); svelte$ = loadSvelte(true); @@ -46,6 +47,7 @@ describe('runtime', () => { return setupHtmlEqual(); }); + after(() => process.off('unhandledRejection', unhandledRejection_handler)); const failed = new Set();