-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
48 lines (46 loc) · 1.01 KB
/
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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: [
'**/*.spec.ts',
'**/*.spec.tsx',
],
testPathIgnorePatterns: [
'<rootDir>/node_modules/',
'<rootDir>/.next/',
],
collectCoverageFrom: [
'**/*.ts',
'**/*.tsx',
],
coveragePathIgnorePatterns: [
'src/pages',
'src/helpers/types.ts',
'src/helpers/constants.ts',
],
};
export default config;