forked from openmrs/openmrs-esm-patient-chart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
37 lines (37 loc) · 974 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
32
33
34
35
36
37
/**
* @returns {Promise<import('jest').Config>}
*/
module.exports = {
transform: {
'^.+\\.(j|t)sx?$': '@swc/jest',
},
transformIgnorePatterns: ['/node_modules/(?!@openmrs)'],
moduleNameMapper: {
'\\.(s?css)$': 'identity-obj-proxy',
'@openmrs/esm-framework': '@openmrs/esm-framework/mock',
'^lodash-es/(.*)$': 'lodash/$1',
'^uuid$': '<rootDir>/node_modules/uuid/dist/index.js',
'^dexie$': require.resolve('dexie'),
},
collectCoverageFrom: [
'**/src/**/*.component.tsx',
'!**/node_modules/**',
'!**/vendor/**',
'!**/src/**/*.test.*',
'!**/src/declarations.d.tsx',
],
coverageThreshold: {
global: {
statements: 80,
branches: 80,
functions: 80,
lines: 80,
},
},
setupFilesAfterEnv: ['<rootDir>/tools/setupTests.ts'],
testPathIgnorePatterns: ['<rootDir>/packages/esm-form-entry-app'],
testEnvironment: 'jsdom',
testEnvironmentOptions: {
url: 'http://localhost/',
},
};