Skip to content

Commit

Permalink
Tests: fix cleanup in cases where server doesn't stop
Browse files Browse the repository at this point in the history
  • Loading branch information
timmywil committed Mar 9, 2024
1 parent 79329f5 commit 11f0e63
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/runner/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
);
Expand Down

0 comments on commit 11f0e63

Please sign in to comment.