-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
27 lines (26 loc) · 911 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
25
26
27
module.exports = {
preset: 'ts-jest/presets/js-with-ts',
rootDir: './',
testEnvironment: 'node',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
moduleNameMapper: {
'\\.(css|less)$': 'identity-obj-proxy',
'^@src/(.*)$': '<rootDir>/src/$1',
},
modulePathIgnorePatterns: ['<rootDir>/cypress/'],
transform: {
'^.+\\.(gql|graphql)$': 'jest-transform-graphql',
'^.+\\.(ts|tsx)$': 'ts-jest',
},
reporters: ['default', 'jest-junit', '<rootDir>/jest/kollide_reporter.js'],
testMatch: ['**/?(*.)+(spec|test).[jt]s?(x)'],
setupFiles: ['./jest/jest.setup.js', 'raf/polyfill'],
testPathIgnorePatterns: ['./.next/', './node_modules/', '<rootDir>/node_modules/'],
snapshotSerializers: ['enzyme-to-json/serializer'],
setupFilesAfterEnv: ['./jest/mutation-setup.ts', './jest/mock-useEffect.ts'],
globals: {
'ts-jest': {
tsConfig: 'tsconfig.jest.json',
},
},
}