Bugfix/i3531 round robin assigns to unavailable members (#3813)

* wip commit

* Finished new algorithm for fetching the least recently booked user

* ROUND_ROBIN fix

* Removed redundant import

* Prisma dependency turned getLuckyUser into a server-only function

* DRY avatars

* Properly passThrough

* name can be undefined.

* Remove debug artefact
This commit is contained in:
Alex van Andel authored and GitHub committed 2022-08-15 13:52:01 -06:00
1 parent c644a10688
commit 297a965508
24 files changed
+353 -337

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
import { PrismaClient } from "@prisma/client";
import { mockDeep, mockReset, DeepMockProxy } from "jest-mock-extended";
import prisma from "@calcom/prisma";
jest.mock("@calcom/prisma", () => ({
__esModule: true,
default: mockDeep<PrismaClient>(),
}));
beforeEach(() => {
mockReset(prismaMock);
});
export const prismaMock = prisma as unknown as DeepMockProxy<PrismaClient>;