forked from martimpassos/sebastiao-lacerda-canopy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
26 lines (23 loc) · 899 Bytes
/
jest.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Add any custom config to be passed to Jest
/** @type {import('jest').Config} */
const config = {
// Add more setup options before each test is run
setupFilesAfterEnv: ["<rootDir>/jest.setup.ts"],
moduleNameMapper: {
// Handle module aliases
"^@/(.*)$": "<rootDir>/$1",
"^@components/(.*)$": "<rootDir>/src/components/$1",
"^@config/(.*)$": "<rootDir>/config/$1",
"^@context/(.*)$": "<rootDir>/src/context/$1",
"^@hooks/(.*)$": "<rootDir>/src/hooks/$1",
"^@lib/(.*)$": "<rootDir>/src/lib/$1",
"^@mocks/(.*)$": "<rootDir>/src/mocks/$1",
"^@pages/(.*)$": "<rootDir>/src/pages/$1",
"^@styles/(.*)$": "<rootDir>/src/styles/$1",
"^@types/(.*)$": "<rootDir>/src/types/$1",
// Mock next/font
"next/font": "<rootDir>/src/mocks/next-font.ts",
},
testEnvironment: "jest-environment-jsdom",
};
export default config;