forked from gnosis/gp-v1-ui
-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.js
30 lines (28 loc) · 931 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
28
29
30
const loadConfig = require('./src/loadConfig')
const overrideEnvConfig = require('./src/overrideEnvConfig')
const config = overrideEnvConfig(loadConfig(true))
module.exports = {
roots: ['<rootDir>/test'],
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$',
moduleDirectories: ['node_modules', 'src'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
snapshotSerializers: ['enzyme-to-json/serializer'],
setupFilesAfterEnv: ['<rootDir>/test/setupEnzyme.ts'],
moduleNameMapper: {
'\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/test/mocks/fileMock.js',
'\\.(css|less)$': '<rootDir>/test/mocks/fileMock.js',
},
globalSetup: '<rootDir>/test/globalSetup.ts',
globals: {
CONFIG: config,
'ts-jest': {
diagnostics: {
warnOnly: true,
},
},
},
}