-
Notifications
You must be signed in to change notification settings - Fork 65
/
jest.config.js
31 lines (31 loc) · 987 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
/** @type {import('jest').Config} */
module.exports = {
verbose: true,
clearMocks: true,
collectCoverage: true,
coverageThreshold: {
global: {
branches: 10,
functions: 10,
lines: 10,
},
},
coverageReporters: ['json-summary', 'lcov'],
collectCoverageFrom: ['./src/**', '!./src/components/**/*.snap'],
transform: {
'^.+\\.(t|j)sx?$': '@swc/jest',
},
transformIgnorePatterns: ['/node_modules/(?!@openmrs)'],
moduleDirectories: ['node_modules', '__mocks__', __dirname],
moduleNameMapper: {
'^dexie$': require.resolve('dexie'),
'\\.(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',
'^uuid$': '<rootDir>/node_modules/uuid/dist/index.js',
},
setupFilesAfterEnv: ['<rootDir>/src/setupTests.ts'],
testEnvironment: 'jsdom',
};