forked from linagora/cozy-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
32 lines (31 loc) · 869 Bytes
/
jest.config.js
File metadata and controls
32 lines (31 loc) · 869 Bytes
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
32
const commonConfig = {
testURL: 'http://localhost',
setupFiles: ['jest-localstorage-mock'],
setupFilesAfterEnv: [
'./jest.setup.js',
'<rootDir>/packages/cozy-stack-client/src/__tests__/setup.js'
],
watchPathIgnorePatterns: ['node_modules'],
modulePathIgnorePatterns: ['<rootDir>/packages/.*/dist/'],
transformIgnorePatterns: ['node_modules/(?!(cozy-ui))'],
testEnvironment: 'jest-environment-jsdom-sixteen',
moduleFileExtensions: ['js', 'jsx', 'json'],
moduleNameMapper: {
'.(png|gif|jpe?g)$': '<rootDir>/jestHelpers/mocks/fileMock.js'
}
}
module.exports = {
projects: [
{
displayName: 'Test JS files',
testRegex: ['(\\.|/)(test|spec)\\.js$'],
...commonConfig
},
{
displayName: 'Test JSX files',
testMatch: ['**/(*.)(spec|test).jsx'],
browser: true,
...commonConfig
}
]
}