diff --git a/vitest.config.mts b/vitest.config.mts index 357a96c8..a0c8e476 100644 --- a/vitest.config.mts +++ b/vitest.config.mts @@ -18,5 +18,8 @@ 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". + // TODO we should fix the unit tests to not set NODE_ENV and when we do we can remove this + env: { NODE_ENV: "unit" }, }, });