-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.cjs
26 lines (26 loc) · 1.01 KB
/
jest.config.cjs
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
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
roots: ['<rootDir>/tests', '<rootDir>/__mocks__', '<rootDir>/src'],
preset: 'ts-jest',
testEnvironment: 'jest-environment-jsdom',
testPathIgnorePatterns: ['/node_modules'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
moduleNameMapper: {
'\\.(css|scss)$': '<rootDir>/__mocks__/styleMock.js',
'i18next': '<rootDir>/__mocks__/reacti18nextMock.ts',
'@components/(.*)': '<rootDir>/src/components/$1',
'@mocks/(.*)': '<rootDir>/__mocks__/$1',
'@config/(.*)': '<rootDir>/src/config/$1',
'@constants/(.*)': '<rootDir>/src/constants/$1',
'@hooks/(.*)': '<rootDir>/src/hooks/$1',
'@interfaces/(.*)': '<rootDir>/src/interfaces/$1',
'@screens/(.*)': '<rootDir>/src/screens/$1',
'@utils/(.*)': '<rootDir>/src/utils/$1',
'@assets/(.*)': '<rootDir>/src/assets/$1',
'@sass/(.*)': '<rootDir>/src/sass/$1',
'@appRedux/(.*)': '<rootDir>/src/redux/$1'
},
globals: {
window: {}
}
};