fix: stabilize onboarding auth tests (#703) (thanks @mteam88)

This commit is contained in:
Peter Steinberger
2026-01-11 03:42:27 +01:00
parent 77bc11f91c
commit 2b07a2a8ab
3 changed files with 9 additions and 5 deletions

View File

@@ -15,6 +15,7 @@ describe("applyAuthChoice", () => {
const previousStateDir = process.env.CLAWDBOT_STATE_DIR;
const previousAgentDir = process.env.CLAWDBOT_AGENT_DIR;
const previousPiAgentDir = process.env.PI_CODING_AGENT_DIR;
const previousOpenrouterKey = process.env.OPENROUTER_API_KEY;
let tempStateDir: string | null = null;
afterEach(async () => {
@@ -37,6 +38,11 @@ describe("applyAuthChoice", () => {
} else {
process.env.PI_CODING_AGENT_DIR = previousPiAgentDir;
}
if (previousOpenrouterKey === undefined) {
delete process.env.OPENROUTER_API_KEY;
} else {
process.env.OPENROUTER_API_KEY = previousOpenrouterKey;
}
});
it("prompts and writes MiniMax API key when selecting minimax-api", async () => {