From 401fca3d8037112f27db2928dc5d70e13adb0831 Mon Sep 17 00:00:00 2001 From: Melissa Hoo Date: Thu, 25 Jun 2026 13:15:59 -0700 Subject: [PATCH 1/2] make unit tests run from ide with correct node env so ssh tests pass --- vitest.config.mts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vitest.config.mts b/vitest.config.mts index 357a96c8..672258c6 100644 --- a/vitest.config.mts +++ b/vitest.config.mts @@ -18,5 +18,7 @@ export default defineConfig({ include: ["**/*.test.ts"], exclude: ["**/node_modules/**", "**/build/**"], globals: true, + // Mirrors the `test:unit` npm script so tests run with NODE_ENV=unit no matter how they're launched (CLI, IDE/Vitest extension). Code under test (e.g. ssh.ts) skips process-exiting side effects when NODE_ENV === "unit". + env: { NODE_ENV: "unit" }, }, }); From 32b97355ca603672eac4a8396150ff227603f1f6 Mon Sep 17 00:00:00 2001 From: Melissa Hoo <96137839+melissarh57@users.noreply.github.com> Date: Thu, 25 Jun 2026 14:26:00 -0700 Subject: [PATCH 2/2] add todo comment remove when fix to not use nodeenv --- vitest.config.mts | 1 + 1 file changed, 1 insertion(+) diff --git a/vitest.config.mts b/vitest.config.mts index 672258c6..a0c8e476 100644 --- a/vitest.config.mts +++ b/vitest.config.mts @@ -19,6 +19,7 @@ export default defineConfig({ exclude: ["**/node_modules/**", "**/build/**"], globals: true, // Mirrors the `test:unit` npm script so tests run with NODE_ENV=unit no matter how they're launched (CLI, IDE/Vitest extension). Code under test (e.g. ssh.ts) skips process-exiting side effects when NODE_ENV === "unit". + // TODO we should fix the unit tests to not set NODE_ENV and when we do we can remove this env: { NODE_ENV: "unit" }, }, });