remove unhandledRejection handler when runtime tests are done

pull/6790/head
Conduitry 5 years ago
parent 89b02557b2
commit 1c649f974e

@ -25,12 +25,13 @@ let compile = null;
const sveltePath = process.cwd().split('\\').join('/'); const sveltePath = process.cwd().split('\\').join('/');
let unhandled_rejection = false; let unhandled_rejection = false;
process.on('unhandledRejection', err => { function unhandledRejection_handler(err) {
unhandled_rejection = err; unhandled_rejection = err;
}); }
describe('runtime', () => { describe('runtime', () => {
before(() => { before(() => {
process.on('unhandledRejection', unhandledRejection_handler);
svelte = loadSvelte(false); svelte = loadSvelte(false);
svelte$ = loadSvelte(true); svelte$ = loadSvelte(true);
@ -46,6 +47,7 @@ describe('runtime', () => {
return setupHtmlEqual(); return setupHtmlEqual();
}); });
after(() => process.off('unhandledRejection', unhandledRejection_handler));
const failed = new Set(); const failed = new Set();

Loading…
Cancel
Save