-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
jest.config.js
54 lines (53 loc) · 1.19 KB
/
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
47
48
49
50
51
52
53
54
const esModules = [
'hast-util-embedded',
'hast-util-has-property',
'hast-util-is-body-ok-link',
'hast-util-is-element',
'hast-util-phrasing',
'hast-util-to-mdast',
'hast-util-to-text',
'hast-util-whitespace',
'mdast-util-phrasing',
'mdast-util-to-string',
'rehype-minify-whitespace',
'trim-trailing-lines',
'unist-util-find-after',
'unist-util-is',
'unist-util-parents',
'unist-util-position',
'unist-util-visit',
]
module.exports = {
collectCoverageFrom: [
'src/**/*.js',
'src/**/*.jsx',
'src/**/*.ts',
'src/**/*.tsx',
],
coveragePathIgnorePatterns: [
'/node_modules/',
'.*\\.d\\.ts',
'prebundles/mocks',
],
coverageThreshold: { global: { lines: 95 } },
moduleFileExtensions: [
'js',
'jsx',
'cjs',
'mjs',
'ts',
'tsx',
'json',
'node',
],
moduleNameMapper: {
'^jsx-slack(.*)$': '<rootDir>$1',
},
preset: 'ts-jest/presets/js-with-babel',
resetMocks: true,
restoreMocks: true,
testEnvironment: 'node',
testMatch: ['<rootDir>/test/**/!(_)*.[jt]s?(x)'],
testPathIgnorePatterns: ['/node_modules/', 'babel.config.js'],
transformIgnorePatterns: [`/node_modules/(?!${esModules.join('|')})`],
}