forked from microsoft/accessibility-insights-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.base.js
39 lines (39 loc) · 1.36 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
37
38
39
// 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',
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.json',
},
},
moduleDirectories: ['node_modules'],
moduleFileExtensions: ['ts', 'js', 'json'],
moduleNameMapper: {
'office-ui-fabric-react/lib/(.*)$': 'office-ui-fabric-react/lib-commonjs/$1',
'@uifabric/styling': '@uifabric/styling/lib-commonjs',
},
reporters: ['default', ['jest-junit', { outputDirectory: '<rootDir>/test-results/unit', outputName: 'junit.xml' }]],
setupFilesAfterEnv: ['jest-extended'],
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
},
testMatch: ['**/*.spec.[tj]s'],
testPathIgnorePatterns: ['/dist/', '/out/'],
verbose: true,
};