-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathjest.config.js
49 lines (45 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
47
48
49
/** *****************************************************************************
* Licensed Materials - Property of IBM
* (c) Copyright IBM Corporation 2019. All Rights Reserved.
*
* Note to U.S. Government Users Restricted Rights:
* Use, duplication or disclosure restricted by GSA ADP Schedule
* Contract with IBM Corp.
* Copyright (c) 2020 Red Hat, Inc.
****************************************************************************** */
// Copyright Contributors to the Open Cluster Management project
const tapReporter = [
'jest-tap-reporter',
{
logLevel: 'ERROR',
showInternalStackTraces: true,
filePath: 'test-output/jestTestLogs.tap',
},
];
const jestConfig = {
collectCoverage: true,
coverageDirectory: './test-output/coverage',
coverageReporters: [
'json',
'html',
'lcov',
'text',
],
coverageThreshold: {
global: {
branches: 38,
functions: 59,
lines: 49,
statements: 50,
},
},
collectCoverageFrom: [
'src/v2/**/*.{js,jsx}',
'!src/**/mocks/*.js',
],
testEnvironment: 'node',
setupFilesAfterEnv: ['./jest.setup.js'],
testResultsProcessor: 'jest-sonar-reporter',
};
jestConfig.reporters = process.env.TRAVIS ? ['default', tapReporter] : ['default'];
module.exports = jestConfig;