forked from webex/webex-js-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
127 lines (120 loc) · 3.43 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
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
const packages = [
'@webex/common',
'@webex/common-evented',
'@webex/common-timers',
'@webex/helper-html',
'@webex/helper-image',
'@webex/http-core',
'@webex/internal-plugin-avatar',
'@webex/internal-plugin-board',
'@webex/internal-plugin-calendar',
'@webex/internal-plugin-conversation',
'@webex/internal-plugin-device',
'@webex/internal-plugin-dss',
'@webex/internal-plugin-ediscovery',
'@webex/internal-plugin-encryption',
'@webex/internal-plugin-feature',
'@webex/internal-plugin-flag',
'@webex/internal-plugin-scheduler',
'@webex/internal-plugin-llm',
'@webex/internal-plugin-locus',
'@webex/internal-plugin-lyra',
'@webex/internal-plugin-mercury',
'@webex/internal-plugin-metrics',
'@webex/internal-plugin-presence',
'@webex/internal-plugin-search',
'@webex/internal-plugin-support',
'@webex/internal-plugin-team',
'@webex/internal-plugin-user',
'@webex/internal-plugin-voicea',
'@webex/internal-plugin-wdm',
'@webex/jsdoctrinetest',
'@webex/plugin-attachment-actions',
'@webex/plugin-authorization',
'@webex/plugin-authorization-browser',
'@webex/plugin-authorization-browser-first-party',
'@webex/plugin-authorization-node',
'@webex/plugin-device-manager',
'@webex/plugin-logger',
'@webex/plugin-memberships',
'@webex/plugin-messages',
'@webex/plugin-people',
'@webex/plugin-rooms',
'@webex/plugin-team-memberships',
'@webex/plugin-teams',
'@webex/plugin-webhooks',
'@webex/recipe-private-web-client',
'@webex/storage-adapter-local-forage',
'@webex/storage-adapter-local-storage',
'@webex/storage-adapter-session-storage',
'@webex/storage-adapter-spec',
'@webex/test-helper-appid',
'@webex/test-helper-automation',
'@webex/test-helper-chai',
'@webex/test-helper-file',
'@webex/test-helper-make-local-url',
'@webex/test-helper-mocha',
'@webex/test-helper-mock-web-socket',
'@webex/test-helper-mock-webex',
'@webex/test-helper-refresh-callback',
'@webex/test-helper-retry',
'@webex/test-helper-server',
'@webex/test-helper-test-users',
'@webex/test-users',
'@webex/webex-core',
'@webex/webex-server',
'@webex/webrtc',
'@webex/xunit-with-logs',
];
/* const packagesWithSetup = [
//'@webex/plugin-meetings'
]; */
const jestProject = [];
packages.forEach((packageName) => {
const config = {
transform: {
'\\.[jt]sx?$': ['babel-jest', {rootMode: 'upward'}],
},
preset: 'ts-jest',
testEnvironment: 'node',
displayName: packageName,
testMatch: [`<rootDir>/packages/${packageName}/test/unit/**/!(lib|fixture)/*.[jt]s`],
};
/* if (packagesWithSetup.includes(packageName)) {
config.setupFiles = [`<rootDir>/packages/${packageName}/jest.setup.js`];
} */
jestProject.push(config);
});
module.exports = {
clearMocks: true,
rootDir: './',
testEnvironment: 'jsdom',
collectCoverage: false,
coverageReporters: ['text'],
coverageProvider: 'v8',
transform: {
'\\.[jt]sx?$': ['babel-jest', {rootMode: 'upward'}],
},
projects: jestProject,
reporters: [
'default',
[
'jest-junit',
{
outputDirectory: './coverage/junit',
outputName: 'coverage-junit.xml',
classNameTemplate: '{classname}',
titleTemplate: '{title}',
},
],
[
'jest-html-reporters',
{
publicPath: './coverage/html',
filename: 'jest-result.html',
},
],
],
testPathIgnorePatterns: ['/node_modules/', '/dist/'],
testResultsProcessor: 'jest-junit',
};