-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
46 lines (42 loc) · 997 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
35
36
37
38
39
40
41
42
43
44
45
46
/* eslint-disable no-undef */
const filExtensions =
'\\.(css|scss|sass|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$'
const config = {
moduleNameMapper: {
[filExtensions]: 'identity-obj-proxy',
},
setupFiles: ['<rootDir>/src/tests/setup.ts'],
/**
* Watch
*/
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname',
],
/**
* NYC coverage
* see https://jestjs.io/docs/en/configuration#coveragedirectory-string
*/
collectCoverage: true,
collectCoverageFrom: [
'src/**/*.{ts,tsx,js,jsx}',
/**
* Exclude style declaration files
*/
'!src/**/*.{scss,css,scss}.d.ts',
/**
* Exclude storybook files
*/
'!src/**/*/*.stories.{ts,tsx,js,jsx}',
],
coverageReporters: ['lcov', 'text', 'text-summary'],
coverageThreshold: {
global: {
branches: 75,
functions: 75,
lines: 75,
statements: 75,
},
},
}
module.exports = config