From 72f7372e970ba4f7bece031ddab8118e39aa8bea Mon Sep 17 00:00:00 2001 From: Gustavo Madeira Santana Date: Fri, 3 Apr 2026 21:02:48 -0400 Subject: [PATCH] test: stabilize vertex adc regression assertions --- extensions/anthropic-vertex/region.adc.test.ts | 3 +++ .../anthropic-vertex-auth-presence.preflight.test.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/extensions/anthropic-vertex/region.adc.test.ts b/extensions/anthropic-vertex/region.adc.test.ts index 5313a266ced..605820c9fce 100644 --- a/extensions/anthropic-vertex/region.adc.test.ts +++ b/extensions/anthropic-vertex/region.adc.test.ts @@ -38,6 +38,9 @@ describe("anthropic-vertex ADC reads", () => { GOOGLE_APPLICATION_CREDENTIALS: "/tmp/vertex-adc.json", } as NodeJS.ProcessEnv; + existsSyncMock.mockClear(); + readFileSyncMock.mockClear(); + expect(resolveAnthropicVertexProjectId(env)).toBe("vertex-project"); expect(hasAnthropicVertexAvailableAuth(env)).toBe(true); expect(existsSyncMock).not.toHaveBeenCalled(); diff --git a/src/plugin-sdk/anthropic-vertex-auth-presence.preflight.test.ts b/src/plugin-sdk/anthropic-vertex-auth-presence.preflight.test.ts index 1d175765695..cc79c2b712e 100644 --- a/src/plugin-sdk/anthropic-vertex-auth-presence.preflight.test.ts +++ b/src/plugin-sdk/anthropic-vertex-auth-presence.preflight.test.ts @@ -34,6 +34,9 @@ describe("hasAnthropicVertexAvailableAuth ADC preflight", () => { }); it("reads explicit ADC credentials without an existsSync preflight", () => { + existsSyncMock.mockClear(); + readFileSyncMock.mockClear(); + expect( hasAnthropicVertexAvailableAuth({ GOOGLE_APPLICATION_CREDENTIALS: "/tmp/vertex-adc.json",