From 0754d5966400ff12e216031d68cb25ea314eac55 Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Fri, 8 Mar 2024 18:40:55 -0500 Subject: [PATCH] Tests: fix cleanup in cases where server doesn't stop --- test/runner/run.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/runner/run.js b/test/runner/run.js index 9f7a38aa7..4874fb6f9 100644 --- a/test/runner/run.js +++ b/test/runner/run.js @@ -170,21 +170,21 @@ export async function run( { async function cleanup() { console.log( "Cleaning up..." ); + await cleanupAllBrowsers( { verbose } ); + cleanupAllJSDOM( { verbose } ); + if ( tunnel ) { await tunnel.stop(); if ( verbose ) { console.log( "Stopped BrowserStackLocal." ); } } - - await cleanupAllBrowsers( { verbose } ); - cleanupAllJSDOM( { verbose } ); } asyncExitHook( async() => { - await stopServer(); await cleanup(); + await stopServer(); }, { wait: EXIT_HOOK_WAIT_TIMEOUT } ); -- 2.39.5