test: stabilize vertex adc regression assertions

This commit is contained in:
Gustavo Madeira Santana 2026-04-03 21:02:48 -04:00
parent fd236e1fc4
commit 72f7372e97
2 changed files with 6 additions and 0 deletions

View File

@ -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();

View File

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