-
Notifications
You must be signed in to change notification settings - Fork 284
/
jest.config.ts
27 lines (25 loc) · 1.03 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
import { InitialOptionsTsJest } from 'ts-jest/dist/types';
const config: InitialOptionsTsJest = {
preset: 'ts-jest/presets/js-with-ts',
moduleNameMapper: {
'\\.(css|sass|less|scss)$': 'identity-obj-proxy',
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/fileMock.js',
'^containers(.*)$': '<rootDir>/src/containers$1',
'^components(.*)$': '<rootDir>/src/components$1',
'^config(.*)$': '<rootDir>/src/config$1',
'^utils(.*)$': '<rootDir>/src/utils$1',
'^styles(.*)$': '<rootDir>/src/styles$1',
'^pages(.*)$': '<rootDir>/src/pages$1',
'^shared(.*)$': '<rootDir>/src/shared$1',
'^test(.*)$': '<rootDir>/src/test$1',
},
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.test.json',
},
},
setupFiles: ['<rootDir>/src/setupTests.ts', 'jest-canvas-mock'],
testMatch: ['<rootDir>/src/**/*.spec.ts', '<rootDir>/src/**/*.spec.tsx'],
};
export default config;