-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.ts
31 lines (28 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
27
28
29
30
31
/**
* For a detailed explanation regarding each configuration property, visit:
* https://jestjs.io/docs/configuration
*/
import nextJest from 'next/jest.js'
import type { Config } from 'jest';
const createJestConfig = nextJest({
dir: './',
})
const config: Config = {
clearMocks: true,
collectCoverage: true,
coverageDirectory: 'coverage',
coverageProvider: 'v8',
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'\\.(css|less|scss|sass)$': '<rootDir>/src/__mocks__/styleMock.js',
'@infrastructure/(.*)$': ['<rootDir>/src/infrastructure/$1'],
"@modules/(.*)$": ["<rootDir>/src/modules/$1"],
"@contexts/(.*)$": ["<rootDir>/src/contexts/$1"],
"@shared/(.*)$": ["<rootDir>/src/shared/$1"],
},
roots: ['<rootDir>'],
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
testEnvironment: 'jsdom',
verbose: true,
};
export default createJestConfig(config)