-
Notifications
You must be signed in to change notification settings - Fork 11
/
jest.config.js
37 lines (37 loc) · 1.12 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
/*
* Copyright (c) 2020, salesforce.com, inc.
* All rights reserved.
* SPDX-License-Identifier: MIT
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/
module.exports = {
displayName: 'Unit Tests',
setupFilesAfterEnv: ['jest-extended', 'jest-chain'],
transform: {
'^.+\\.ts?$': 'ts-jest'
},
testMatch: ['**/__tests__/**/?(*.)(spec|test).(js|ts)'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
testPathIgnorePatterns: ['/node_modules/', '/lib/', '/dist/'],
moduleDirectories: ['node_modules'],
collectCoverage: false,
coverageReporters: ['json', 'html', 'text'],
collectCoverageFrom: ['src/**/*.ts', 'src/**/*.js', 'modules/**/*.js'],
coveragePathIgnorePatterns: [
'prismjs.js'
],
coverageDirectory: 'reports/coverage',
reporters: [
'default',
[
'jest-junit',
{
suiteName: 'Unit Tests',
output: './reports/junit/jest-results.xml'
}
]
],
fakeTimers: {
enableGlobally: true,
}
};