diff --git a/src/scripts/prepare-codex-ci-auth.test.ts b/src/scripts/prepare-codex-ci-auth.test.ts index 25cbc50b750..644d9c1b2f2 100644 --- a/src/scripts/prepare-codex-ci-auth.test.ts +++ b/src/scripts/prepare-codex-ci-auth.test.ts @@ -32,10 +32,9 @@ describe("prepare-codex-ci-auth", () => { }); expect(result.changed).toBe(true); - expect(decodeJwtPayload(String(result.auth.tokens?.id_token))).toMatchObject({ - email: "peter@example.com", - chatgpt_account_id: "acct_123", - }); + const payload = decodeJwtPayload(String(result.auth.tokens?.id_token)); + expect(payload.email).toBe("peter@example.com"); + expect(payload.chatgpt_account_id).toBe("acct_123"); }); it("leaves current auth metadata unchanged", () => { @@ -77,10 +76,9 @@ describe("prepare-codex-ci-auth", () => { const updated = JSON.parse(await fs.readFile(authPath, "utf-8")) as { tokens?: { id_token?: string }; }; - expect(decodeJwtPayload(String(updated.tokens?.id_token))).toMatchObject({ - sub: "user", - chatgpt_account_id: "acct_123", - }); + const payload = decodeJwtPayload(String(updated.tokens?.id_token)); + expect(payload.sub).toBe("user"); + expect(payload.chatgpt_account_id).toBe("acct_123"); }); }); });