-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathjest.config.js
46 lines (44 loc) · 1.26 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
const reportPortalConfig = [
'@reportportal/agent-js-jest',
{
apiKey: process.env.REPORTPORTAL_API_KEY,
endpoint: process.env.REPORTPORTAL_ENDPOINT,
project: process.env.REPORTPORTAL_PROJECT,
launch: 'line_listing_app',
attributes: [
{
key: 'dhis2_version',
value: 'master',
},
{
key: 'app_name',
value: 'line-listing-app',
},
{
key: 'test_level',
value: 'unit/integration',
},
],
description: '',
debug: true,
},
]
const isReportPortalSetup =
process.env.REPORTPORTAL_API_KEY !== undefined &&
process.env.REPORTPORTAL_ENDPOINT !== undefined &&
process.env.REPORTPORTAL_PROJECT !== undefined
module.exports = {
transformIgnorePatterns: [
'node_modules/(?!(lodash-es|@dhis2/d2-ui-[a-z-]+)/)',
],
setupFilesAfterEnv: ['./config/testSetup.js'],
moduleNameMapper: {
'\\.(css)$': 'identity-obj-proxy',
},
testRunner: 'jest-circus/runner',
testRegex: ['/src/modules/__tests__/.*.spec.js?$'],
reporters: [
'default',
...(isReportPortalSetup ? [reportPortalConfig] : []),
],
}