forked from draft-js-plugins/draft-js-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.base.js
29 lines (28 loc) · 906 Bytes
/
jest.config.base.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
// For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html
module.exports = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
setupFilesAfterEnv: [`${__dirname}/jestHelper.js`],
moduleFileExtensions: ['jsx', 'js', 'ts', 'tsx'],
transform: {
'^.+\\.tsx?$': 'ts-jest',
'^.+\\.(js|jsx)$': 'babel-jest',
},
moduleDirectories: ['node_modules', 'src'],
testPathIgnorePatterns: ['./node_modules/'],
collectCoverageFrom: [],
coveragePathIgnorePatterns: ['.stories.*'],
coverageThreshold: {
global: {},
},
transformIgnorePatterns: [`${__dirname}/node_modules/(?!lodash-es)`],
globals: {
'ts-jest': {
babelConfig: `${__dirname}/babel.config.js`,
// pervent memory leak since jest 27 update
// see https://github.com/kulshekhar/ts-jest/issues/1967
isolatedModules: true,
},
},
};