Scheduling infrastructure for absolutely everyone.
fix: mock delegationCredential in getRoutedUsers test to prevent flaky worker shutdown errors (#28603)
Sahitya Chandra2fc630ed9260
diff --git a/packages/features/users/lib/getRoutedUsers.test.ts b/packages/features/users/lib/getRoutedUsers.test.tsindex 09b853683f4..72e40718322 100644--- a/packages/features/users/lib/getRoutedUsers.test.ts+++ b/packages/features/users/lib/getRoutedUsers.test.ts@@ -1,5 +1,4 @@-import { describe, it, expect, vi } from "vitest";-+import { describe, expect, it, vi } from "vitest";import { getRoutedUsersWithContactOwnerAndFixedUsers } from "./getRoutedUsers";vi.mock("@calcom/prisma", () => {@@ -8,6 +7,12 @@ vi.mock("@calcom/prisma", () => {};});+vi.mock("@calcom/app-store/delegationCredential", () => {+ return {+ enrichHostsWithDelegationCredentials: vi.fn().mockResolvedValue([]),+ };+});+describe("getRoutedUsersWithContactOwnerAndFixedUsers", () => {const users = [{ id: 1, email: "[email protected]", isFixed: false },