forked from UCSF-IGHS/openmrs-esm-ohri
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
29 lines (28 loc) · 823 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
// Sync object
/** @type {import('@jest/types').Config.InitialOptions} */
const config = {
verbose: true,
collectCoverage: true,
coverageThreshold: {
global: {
branches: 10,
functions: 10,
lines: 10,
},
},
coverageReporters: ['json-summary', 'lcov'],
collectCoverageFrom: ['./src/forms/**', '!./src/components/**/*.snap'],
transform: {
'^.+\\.tsx?$': '@swc/jest',
},
transformIgnorePatterns: ['/node_modules/(?!@openmrs)'],
moduleNameMapper: {
'\\.(s?css)$': 'identity-obj-proxy',
'@openmrs/esm-framework': '@openmrs/esm-framework/mock',
'react-i18next': '<rootDir>/__mocks__/react-i18next.js',
'lodash-es': 'lodash',
'react-markdown': '<rootDir>/__mocks__/react-markdown.tsx',
'^dexie$': require.resolve('dexie'),
},
};
module.exports = config;