Files
calendar/tests/libs/__mocks__/getTranslation.ts
T
Hariom BalharaandGitHub 6670bbc1d7 fix: Error in team members migration during org onboarding (#15349)
* fix: Error in team members migration during org onboarding

* Add invitationMemberHandler tests

* Add unit tests

* Improve tests and refactor

* Improve tests and refactor

* Fix type issue

* Fix createNewUsersConnectToOrgIfExists args
2024-06-27 00:53:55 +00:00

22 lines
610 B
TypeScript

import { beforeEach, vi } from "vitest";
import { mockReset, mockDeep } from "vitest-mock-extended";
import type * as getTranslation from "@calcom/lib/server/i18n";
vi.mock("@calcom/lib/server/i18n", () => getTranslationMock);
beforeEach(() => {
mockReset(getTranslationMock);
});
const getTranslationMock = mockDeep<typeof getTranslation>();
export const mock = {
fakeIdentityFn: () =>
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
//@ts-ignore
getTranslationMock.getTranslation.mockImplementation(async () => (key: string) => key),
};
export default getTranslationMock;