-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjest.config.js
40 lines (37 loc) · 907 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
38
39
40
const reporters = [
'default',
[
'./node_modules/jest-html-reporter',
{
pageTitle: 'Test Report',
outputPath: './reports/jest/index.html',
includeFailureMsg: true,
},
],
];
if (process.env.CI === 'true') {
reporters.push('summary');
reporters.push(['github-actions', { silent: false }]);
} else {
reporters.push('default');
}
/** @type {import('ts-jest').JestConfigWithTsJest} */
const config = {
testEnvironment: 'node',
testPathIgnorePatterns: ['out'],
collectCoverage: true,
collectCoverageFrom: ['src/**/*.ts'],
coveragePathIgnorePatterns: ['src/extension.ts'],
coverageReporters: ['clover', 'json', 'lcov', ['text', { skipFull: true }]],
coverageDirectory: './reports/coverage',
transform: {
'^.+\\.ts?$': [
'ts-jest',
{
isolatedModules: true,
},
],
},
reporters: reporters,
};
module.exports = config;