diff options
author | Timmy Willison <timmywil@users.noreply.github.com> | 2024-03-08 18:40:55 -0500 |
---|---|---|
committer | Timmy Willison <timmywil@users.noreply.github.com> | 2024-03-09 10:36:47 -0500 |
commit | 0754d5966400ff12e216031d68cb25ea314eac55 (patch) | |
tree | 852123371c50c2580a9edf1f51dbf1a329fcb011 | |
parent | 5aa7ed888ddf314fba3c4f8750b891cb6427c9c2 (diff) | |
download | jquery-0754d5966400ff12e216031d68cb25ea314eac55.tar.gz jquery-0754d5966400ff12e216031d68cb25ea314eac55.zip |
Tests: fix cleanup in cases where server doesn't stop
-rw-r--r-- | test/runner/run.js | 8 |
1 files 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 } ); |