-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.ts
28 lines (26 loc) · 940 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
27
28
import type { Config } from "@jest/types";
const config: Config.InitialOptions = {
verbose: true,
passWithNoTests: true,
testEnvironment: "./jest.setup.ts",
transform: {
"^.+\\.(js|jsx|ts|tsx)$": [
"babel-jest",
{
presets: ["next/babel"],
},
],
},
transformIgnorePatterns: ["/node_modules/", "^.+\\.module\\.(css|sass|scss)$"],
moduleNameMapper: {
"^.+\\.module\\.(css|sass|scss)$": "identity-obj-proxy",
"react-markdown": "<rootDir>/node_modules/react-markdown/react-markdown.min.js",
"@/(.*)": "<rootDir>/src/$1", // For TypeScript custom module resolutions
},
roots: ["src/"],
testMatch: ["**/*.test.ts", "**/*.test.tsx"],
testPathIgnorePatterns: ["<rootDir>/node_modules/", "<rootDir>/.next/"],
collectCoverageFrom: ["**/*.ts", "**/*.tsx"],
coveragePathIgnorePatterns: ["src/pages", "src/helpers/types.ts", "src/helpers/constants.ts"],
};
export default config;