forked from webex/webex-js-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
75 lines (72 loc) · 1.79 KB
/
jest.config.js
File metadata and controls
75 lines (72 loc) · 1.79 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
const config = require('@webex/jest-config-legacy');
const path = require('path');
const jestConfig = {
testEnvironment: 'jsdom',
// Clear mocks in between tests by default
clearMocks: true,
collectCoverage: true,
// TODO: Increase thresholds to 85% as project is maintained
// TODO: remove the thresholds for individual files.
coverageThreshold: {
global: {
lines: 85,
functions: 85,
branches: 80,
statements: 85,
},
'src/Events/impl': {
lines: 80,
functions: 65,
statements: 80,
},
'src/Logger': {
lines: 75,
functions: 85,
statements: 75,
},
'src/Voicemail': {
lines: 40,
functions: 30,
statements: 40,
},
'src/SDKConnector': {
lines: 60,
functions: 55,
statements: 60,
},
'src/CallHistory': {
statements: 55,
functions: 75,
},
},
coverageDirectory: 'coverage',
coverageReporters: ['clover', 'json', 'lcov'],
transformIgnorePatterns: ['/node_modules/(?!(@webex/internal-media-core)/)'],
testMatch: ['<rootDir>/src/**/*.test.[jt]s'],
moduleNameMapper: {'^uuid$': 'uuid'},
reporters: [
'default',
[
'jest-junit',
{
outputDirectory: 'coverage/junit',
outputName: 'coverage-junit.xml',
classNameTemplate: '{classname}',
titleTemplate: '{title}',
},
],
[
'jest-html-reporters',
{
publicPath: './coverage',
filename: 'jest-report.html',
openReport: false,
},
],
],
rootDir: path.resolve(__dirname),
setupFilesAfterEnv: ['<rootDir>/jest-preload.js', '<rootDir>/jest.expectExtensions.js'],
testPathIgnorePatterns: ['/node_modules/', '/dist/'],
testResultsProcessor: 'jest-junit',
};
module.exports = {...config, ...jestConfig};