chore(SW-360): revert changes made to test config
This commit is contained in:
committed by
Pontus Dreij
parent
65b61c900b
commit
0e0c09dfcd
@@ -154,7 +154,7 @@ const config: Config = {
|
|||||||
// snapshotSerializers: [],
|
// snapshotSerializers: [],
|
||||||
|
|
||||||
// The test environment that will be used for testing
|
// 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
|
// Options that will be passed to the testEnvironment
|
||||||
// testEnvironmentOptions: {},
|
// testEnvironmentOptions: {},
|
||||||
|
|||||||
@@ -1,19 +1 @@
|
|||||||
import "@testing-library/jest-dom"
|
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(),
|
|
||||||
},
|
|
||||||
}))
|
|
||||||
|
|||||||
Reference in New Issue
Block a user