fix: mock @calcom/lib/i18n in EventManager.test.ts to prevent vitest worker shutdown flake (#28630)
* fix: mock @calcom/lib/i18n in EventManager.test.ts to prevent vitest worker shutdown flake TranslationService transitively imports @calcom/lib/i18n which triggers slow module resolution via vite's RPC. When the vitest worker shuts down before it completes, it causes 'Closing rpc while fetch was pending' errors. Mocking the module prevents the actual module resolution during test loading. Co-Authored-By: romitgabani1 <romitgabani1.work@gmail.com> * chore: remove explanatory comments per review feedback Co-Authored-By: romitgabani1 <romitgabani1.work@gmail.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
romitgabani1
Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent
ad791f8ea5
commit
0f4717e0be
@@ -18,6 +18,11 @@ vi.mock("@calcom/features/watchlist/operations/check-if-users-are-blocked.contro
|
||||
vi.mock("@calcom/features/watchlist/lib/telemetry", () => ({
|
||||
sentrySpan: vi.fn(),
|
||||
}));
|
||||
vi.mock("@calcom/lib/i18n", () => ({
|
||||
locales: ["en"],
|
||||
localeOptions: [{ value: "en", label: "English" }],
|
||||
defaultLocaleOption: { value: "en", label: "English" },
|
||||
}));
|
||||
|
||||
import process from "node:process";
|
||||
import { CredentialRepository } from "@calcom/features/credentials/repositories/CredentialRepository";
|
||||
|
||||
Reference in New Issue
Block a user