From: Timmy Willison Date: Fri, 8 Mar 2024 23:40:55 +0000 (-0500) Subject: Tests: fix cleanup in cases where server doesn't stop X-Git-Tag: 4.0.0-beta.2~36 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0754d5966400ff12e216031d68cb25ea314eac55;p=jquery.git Tests: fix cleanup in cases where server doesn't stop --- 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 } );