mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Tests: fix cleanup in cases where server doesn't stop
This commit is contained in:
parent
5aa7ed888d
commit
0754d59664
@ -170,21 +170,21 @@ export async function run( {
|
|||||||
async function cleanup() {
|
async function cleanup() {
|
||||||
console.log( "Cleaning up..." );
|
console.log( "Cleaning up..." );
|
||||||
|
|
||||||
|
await cleanupAllBrowsers( { verbose } );
|
||||||
|
cleanupAllJSDOM( { verbose } );
|
||||||
|
|
||||||
if ( tunnel ) {
|
if ( tunnel ) {
|
||||||
await tunnel.stop();
|
await tunnel.stop();
|
||||||
if ( verbose ) {
|
if ( verbose ) {
|
||||||
console.log( "Stopped BrowserStackLocal." );
|
console.log( "Stopped BrowserStackLocal." );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await cleanupAllBrowsers( { verbose } );
|
|
||||||
cleanupAllJSDOM( { verbose } );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
asyncExitHook(
|
asyncExitHook(
|
||||||
async() => {
|
async() => {
|
||||||
await stopServer();
|
|
||||||
await cleanup();
|
await cleanup();
|
||||||
|
await stopServer();
|
||||||
},
|
},
|
||||||
{ wait: EXIT_HOOK_WAIT_TIMEOUT }
|
{ wait: EXIT_HOOK_WAIT_TIMEOUT }
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user