-
Notifications
You must be signed in to change notification settings - Fork 103
Expand file tree
/
Copy pathjest.config.js
More file actions
31 lines (31 loc) · 1 KB
/
jest.config.js
File metadata and controls
31 lines (31 loc) · 1 KB
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: {
'^.+\\.[jt]sx?$': ['@swc/jest', { swcrc: false }],
},
transformIgnorePatterns: ['/node_modules/(?!@openmrs|.+\\.pnp\\.[^\\/]+$)'],
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/setup-tests.ts'],
testEnvironment: 'jsdom',
};