forked from core-ds/core-components
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
29 lines (28 loc) · 1.08 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
const ignoredModules = ['simplebar'];
module.exports = {
preset: 'ts-jest/presets/js-with-ts',
testEnvironment: 'jest-environment-jsdom-sixteen',
setupFilesAfterEnv: ['./packages/setupTests.ts'],
modulePathIgnorePatterns: ['dist'],
globalSetup: './packages/globalSetup.ts',
globals: {
'ts-jest': {
babelConfig: {
plugins: [
'@babel/plugin-proposal-optional-chaining',
'@babel/plugin-proposal-nullish-coalescing-operator',
],
},
},
},
moduleNameMapper: {
'@alfalab/core-components-(.*)/(.*)$': '<rootDir>/packages/$1/src/$2',
'@alfalab/core-components-(.*)$': '<rootDir>/packages/$1/src',
'\\.css$': 'identity-obj-proxy',
},
testMatch: ['**/*.test.ts?(x)', '!**/*.screenshots.test.ts?(x)'],
testPathIgnorePatterns: ['codemod'],
transformIgnorePatterns: [`node_modules/(?!${ignoredModules.join('|')})`],
coverageReporters: ['lcov', 'text', 'text-summary', 'clover'],
coveragePathIgnorePatterns: ['index.ts'],
};