Files
calendar/packages/lib/server/__mocks__/serviceAccountKey.ts
T
Volnei MunhozGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
92d2b59946 fix: replace @ts-ignore with @ts-expect-error to fix biome lint errors (#26849)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-01-14 19:05:57 -03:00

20 lines
478 B
TypeScript

import { vi } from "vitest";
vi.mock("@calcom/lib/server/serviceAccountKey", async (importOriginal) => {
const actual = await importOriginal<any>();
return {
...actual,
decryptServiceAccountKey: vi.fn((input) => {
// If input is a string, parse it; otherwise, return as is
if (typeof input === "string") {
try {
return JSON.parse(input);
} catch {
return input;
}
}
return input;
}),
};
});