Skip to content

Commit 01d2145

Browse files
committed
test: improve test isolation by clearing PGAI_API_KEY
Explicitly set PGAI_API_KEY to empty string in isolatedEnv() helper to prevent API key leakage from parent environment during tests.
1 parent 7bc98eb commit 01d2145

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cli/test/issues.cli.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ function isolatedEnv(extra: Record<string, string> = {}) {
3838
return {
3939
XDG_CONFIG_HOME: cfgHome,
4040
HOME: cfgHome,
41+
// Explicitly clear API key to prevent leakage from parent environment
42+
PGAI_API_KEY: "",
4143
...extra,
4244
};
4345
}

0 commit comments

Comments
 (0)