-
Notifications
You must be signed in to change notification settings - Fork 7
/
jest.config.js
31 lines (30 loc) · 1.21 KB
/
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
25
26
27
28
29
30
31
const esModules = ['react-icons', 'lodash-es', 'axios'].join('|')
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
setupFilesAfterEnv: ['<rootDir>/src/setupTests.ts', '<rootDir>/jest-setup.ts'],
collectCoverageFrom: ['./src/**/*.{js,jsx,ts,tsx}'],
moduleNameMapper: {
'\\.(css|less|scss|sass)$': 'identity-obj-proxy',
'^@cdk(.*)$': '<rootDir>/src/django-spa/cdk$1',
'^~types(.*)$': '<rootDir>/src/django-spa/types$1',
'^@plugins(.*)$': '<rootDir>/src/django-spa/plugins$1',
'^@utils(.*)$': '<rootDir>/src/django-spa/utils$1',
'^@test-utils(.*)$': '<rootDir>/src/django-spa/test-utils$1',
'^@components(.*)$': '<rootDir>/src/django-spa/components$1',
'^@aspects(.*)$': '<rootDir>/src/django-spa/aspects$1',
'^@layouts(.*)$': '<rootDir>/src/django-spa/layouts$1',
'^@presenters(.*)$': '<rootDir>/src/django-spa/presenters$1',
'^@smart-components(.*)$': '<rootDir>/src/django-spa/smart-components$1',
},
modulePathIgnorePatterns: ['<rootDir>/.rollup.cache'],
transformIgnorePatterns: [`<rootDir>/node_modules/(?!${esModules})`],
transform: {
js: 'jest-esm-transformer',
},
globals: {
'ts-jest': {
tsconfig: './tsconfig.spec.json',
},
},
}