-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
42 lines (40 loc) · 1.05 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
import type { Config } from '@jest/types'
const config: Config.InitialOptions = {
verbose: true,
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
coverageThreshold: {
global: {
branches: 80,
functions: 75,
lines: 80,
statements: 80
}
},
testPathIgnorePatterns: [
'<rootDir>/node_modules/',
'<rootDir>/.next/',
'<rootDir>/tests/',
'<rootDir>/coverage/',
'<rootDir>/.storybook/'
],
testRegex: '(/__test__/.*|\\.(test|spec))\\.(ts|tsx|js)$',
testEnvironment: 'jsdom',
moduleNameMapper: {
'^.+\\.module\\.(css|sass|scss)$': 'identity-obj-proxy',
'^@components/(.*)$': '<rootDir>/src/components/$1',
'^@providers/(.*)$': '<rootDir>/src/providers/$1',
'^@app/(.*)$': '<rootDir>/src/app/$1',
'^@lib/(.*)$': '<rootDir>/src/lib/$1'
},
transform: {
'^.+\\.(js|jsx|ts|tsx)$': ['babel-jest', { presets: ['next/babel'] }]
},
transformIgnorePatterns: [
'/node_modules/',
'^.+\\.module\\.(css|sass|scss)$'
],
fakeTimers: {
enableGlobally: true
}
}
export default config