]> source.dussan.org Git - jquery.git/commitdiff
Tests: fix cleanup in cases where server doesn't stop
authorTimmy Willison <timmywil@users.noreply.github.com>
Fri, 8 Mar 2024 23:40:55 +0000 (18:40 -0500)
committerTimmy Willison <timmywil@users.noreply.github.com>
Sat, 9 Mar 2024 15:36:47 +0000 (10:36 -0500)
test/runner/run.js

index 9f7a38aa7e30f9e96020995cd917f7f74f0c7841..4874fb6f96b8385dcf216545d35e682594bc5f31 100644 (file)
@@ -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 }
        );