-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.cjs
More file actions
21 lines (21 loc) · 791 Bytes
/
Copy pathjest.config.cjs
File metadata and controls
21 lines (21 loc) · 791 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
module.exports = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
transform: {
'^.+\\.tsx?$': ['ts-jest', {
tsconfig: './tsconfig.app.json'
}]
},
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.[jt]sx?$',
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'\\.(css|less|scss|sass)$': '<rootDir>/__mocks__/cssModuleMock.js',
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/__mocks__/fileMock.js',
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
testPathIgnorePatterns: ['node_modules', 'dist', 'src/tests/e2e'],
transformIgnorePatterns: ['node_modules/'],
setupFilesAfterEnv: ['<rootDir>/setup-test-env.js'],
moduleDirectories: ['node_modules', '<rootDir>/src']
};