chore(SW-360): revert changes made to test config

This commit is contained in:
Chuma McPhoy
2024-10-03 14:28:00 +02:00
parent 6c54a54a9e
commit 516f8555d5
2 changed files with 1 additions and 19 deletions

View File

@@ -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: {},

View File

@@ -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(),
},
}))