-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
24 lines (24 loc) · 931 Bytes
/
jest.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'jest-environment-jsdom',
setupFilesAfterEnv: ['<rootDir>/jest/setup-tests.ts'],
moduleNameMapper: {
'\\.(gif|ttf|eot|svg|png)$': '<rootDir>/jest/__mocks__/setupMock.js',
'\\.(css|less|sass|scss)$': 'identity-obj-proxy',
'^@pages': '<rootDir>/src/pages/index.ts',
'^@components': '<rootDir>/src/components/index.ts',
'^@contexts': '<rootDir>/src/contexts/index.ts',
'^@interfaces': '<rootDir>/src/interfaces/index.ts',
'^@hooks': '<rootDir>/src/hooks/index.ts',
'^@utils': '<rootDir>/src/utils/index.ts',
'^@lib': '<rootDir>/src/lib/index.ts',
'^@routes': '<rootDir>/src/routes/index.ts',
'^@theme': '<rootDir>/src/theme/index.ts',
},
transform: {
'^.+\\.tsx?$': 'ts-jest',
'^.+\\.jsx?$': 'babel-jest',
},
transformIgnorePatterns: ['/node_modules/'],
};