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",