test: verify codex update check env var is set

This commit is contained in:
Prateek 2026-03-07 15:11:00 +05:30
parent 2cd1b02b49
commit 79dcaa043f
1 changed files with 5 additions and 0 deletions

View File

@ -374,6 +374,11 @@ describe("getEnvironment", () => {
expect(env["PATH"]?.startsWith("/mock/home/.ao/bin:")).toBe(true);
});
it("sets CODEX_DISABLE_UPDATE_CHECK=1 to suppress interactive update prompts", () => {
const env = agent.getEnvironment(makeLaunchConfig());
expect(env["CODEX_DISABLE_UPDATE_CHECK"]).toBe("1");
});
it("falls back to /usr/bin:/bin when process.env.PATH is undefined", () => {
const originalPath = process.env["PATH"];
delete process.env["PATH"];