-
Notifications
You must be signed in to change notification settings - Fork 44
/
jest.config.base.js
36 lines (36 loc) · 1.31 KB
/
jest.config.base.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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
module.exports = {
clearMocks: true,
collectCoverage: true,
collectCoverageFrom: [
'<rootDir>/src/**/*.js',
'<rootDir>/src/**/*.ts',
'!<rootDir>/dist/**',
'!<rootDir>/out/**',
'!<rootDir>/**/jest.config.js',
'!<rootDir>/**/prettier.config.js',
'!<rootDir>/**/webpack.config.js',
'!<rootDir>/**/node_modules/**',
'!<rootDir>/**/test-results/**',
],
coverageDirectory: '<rootDir>/test-results/unit/coverage',
coverageReporters: ['json', 'lcov', 'text', 'cobertura'],
displayName: 'unit tests',
moduleDirectories: ['node_modules'],
moduleFileExtensions: ['ts', 'js', 'json'],
reporters: ['default', ['jest-junit', { outputDirectory: '<rootDir>/test-results/unit', outputName: 'junit.xml' }]],
setupFilesAfterEnv: ['jest-extended'],
transform: {
'^.+\\.(jsx?|tsx?)$': [
'ts-jest',
{
isolatedModules: true,
},
],
},
transformIgnorePatterns: ['/node_modules/(?!(serialize-error|get-port))'], // Transform pure ESM with ts-jest
testMatch: ['**/*.spec.[tj]s', '**/*.test.[tj]s'],
testPathIgnorePatterns: ['/dist/', '/out/'],
verbose: true,
};