-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathjest.config.js
27 lines (26 loc) · 994 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
process.env.TZ = 'UTC'
module.exports = {
testURL: 'http://localhost/',
moduleFileExtensions: ['js', 'jsx', 'json', 'styl', 'ts', 'tsx'],
setupFilesAfterEnv: ['./test/jestsetup.js', 'jest-canvas-mock'],
moduleDirectories: ['node_modules', 'src', 'react-styleguidist/lib'],
moduleNameMapper: {
'\\.(png|gif|jpe?g|svg)$': '<rootDir>/test/__mocks__/fileMock.js',
'\\.styl$': 'identity-obj-proxy',
'react-styleguidist.+\\.jsx?$': 'babel-jest',
'^rsg-components(.*)$':
'<rootDir>/node_modules/react-styleguidist/lib/client/rsg-components$1',
'react-pdf/dist/esm/entry.webpack': 'react-pdf',
'^cozy-client$': 'cozy-client/dist/index'
},
transformIgnorePatterns: ['node_modules/(?!(react-styleguidist)/)'],
testPathIgnorePatterns: ['/node_modules/', '/transpiled/', '/dist/'],
transform: {
'^.+\\.(ts|tsx|js|jsx)?$': 'babel-jest'
},
globals: {
__ALLOW_HTTP__: false,
cozy: {}
},
snapshotSerializers: ['enzyme-to-json/serializer']
}