-
Notifications
You must be signed in to change notification settings - Fork 23
/
jest.config.js
34 lines (32 loc) · 917 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
31
32
33
34
// When transformInorePatterns is used, transform needs to be
// explicitly defined for the files that need to be transformed
const babelPresets = require('./.babelrc.json').presets
// FIXME: Migrate this to CommonJS
const esModules = [
'@glrodasz/storybook-tools-styles',
'@glrodasz/storybook-tools-helpers',
].join('|')
module.exports = {
collectCoverageFrom: [
'{atoms,molecules,layout}/**/!(index).js',
'{hocs,helpers}/*.js',
],
coverageThreshold: {
global: {
branches: 60,
functions: 55,
lines: 60,
statements: 60,
},
},
moduleNameMapper: {
'\\.css$': 'identity-obj-proxy',
'\\.svg$': '<rootDir>/utils/testUtils/svgrMock.js',
},
setupFilesAfterEnv: ['./jest.setup.js'],
testEnvironment: 'jsdom',
transform: {
'^.+\\.jsx?$': ['babel-jest', { presets: babelPresets }],
},
transformIgnorePatterns: [`node_modules/(?!${esModules})`],
}