-
Notifications
You must be signed in to change notification settings - Fork 13
/
jest.config.js
26 lines (26 loc) · 962 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
module.exports = {
testEnvironmentOptions: {
url: 'http://localhost/'
},
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx', 'json', 'styl'],
setupFilesAfterEnv: ['<rootDir>/test/jestLib/setup.js'],
moduleDirectories: ['<rootDir>/src', 'node_modules'],
moduleNameMapper: {
'\\.(png|gif|jpe?g|svg)$': '<rootDir>/test/__mocks__/fileMock.js',
// identity-obj-proxy module is installed by cozy-scripts
'^styles': 'identity-obj-proxy',
'\\.styl$': 'identity-obj-proxy',
'\\.css$': 'identity-obj-proxy',
'^cozy-ui/react(.*)$': '<rootDir>/node_modules/cozy-ui/transpiled/react$1',
'^cozy-client$': 'cozy-client/dist/index.js',
'test/(.*)$': '<rootDir>/test/$1'
},
transformIgnorePatterns: ['node_modules/(?!cozy-ui)/'],
globals: {
__ALLOW_HTTP__: false,
__TARGET__: 'browser',
cozy: {}
},
testEnvironment: '<rootDir>/test/jestLib/custom-test-env.js',
resolver: '<rootDir>/test/jestLib/resolver.js'
}