diff --git a/jest.config.ts b/jest.config.ts index bf51303a6..28055b8c6 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -154,7 +154,7 @@ const config: Config = { // snapshotSerializers: [], // The test environment that will be used for testing - testEnvironment: "jest-environment-jsdom", + // testEnvironment: "jest-environment-node", // Options that will be passed to the testEnvironment // testEnvironmentOptions: {}, diff --git a/jest.setup.ts b/jest.setup.ts index 817e0cb28..df6631eeb 100644 --- a/jest.setup.ts +++ b/jest.setup.ts @@ -1,19 +1 @@ import "@testing-library/jest-dom" - -jest.mock("react-intl", () => ({ - useIntl: () => ({ - formatMessage: (message: { id: string }) => message.id, - }), -})) - -jest.mock("next/navigation", () => ({ - useRouter: jest.fn(), - usePathname: jest.fn().mockReturnValue("/"), - useParams: jest.fn().mockReturnValue({ lang: "en" }), -})) - -jest.mock("@/lib/trpc/client", () => ({ - trpc: { - useUtils: jest.fn(), - }, -}))