From cfddde086a66845d29888b3d10f03f5ac4bf0ab7 Mon Sep 17 00:00:00 2001 From: "paseo-bot[bot]" <266920839+paseo-bot[bot]@users.noreply.github.com> Date: Wed, 7 Oct 2026 00:08:38 +0200 Subject: [PATCH] test(cli): clean up the SSH status fixture when daemon startup fails --- packages/cli/tests/44-daemon-status-ssh.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/cli/tests/44-daemon-status-ssh.test.ts b/packages/cli/tests/44-daemon-status-ssh.test.ts index 777c911e02..35c887256a 100644 --- a/packages/cli/tests/44-daemon-status-ssh.test.ts +++ b/packages/cli/tests/44-daemon-status-ssh.test.ts @@ -17,9 +17,10 @@ if (process.platform === "win32") { const SSH_SETUP_MS = 2500; const root = await mkdtemp(join(tmpdir(), "paseo-status-ssh-")); -const daemon = await startTestDaemon(); +let daemon: Awaited> | undefined; try { + daemon = await startTestDaemon(); // Opens the -W stream only after the delay a real SSH handshake takes. await writeFile( join(root, "ssh"), @@ -49,7 +50,7 @@ setTimeout(() => { assert.strictEqual(typeof status.serverId, "string"); console.log("✓ status waits for the SSH stream like other commands\n"); } finally { - await daemon.stop(); + await daemon?.stop(); await rm(root, { recursive: true, force: true }); }