-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathjest.preset.js
37 lines (36 loc) · 995 Bytes
/
jest.preset.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
const nxPreset = require('@nx/jest/preset').default;
module.exports = {
...nxPreset,
coverageReporters: ['json-summary', 'json', 'html', 'text', 'lcov'],
coveragePathIgnorePatterns: ['/node_modules/', '.html', '.mock.ts', '.module.ts', 'polyfills.ts', '.routes.ts'],
moduleFileExtensions: ['ts', 'js', 'html'],
noStackTrace: true,
reporters: [
'default',
[
'jest-html-reporters',
{
publicPath: './tmp/results',
filename: 'index.html',
expand: false,
hideIcon: true,
pageTitle: 'Results'
}
],
[
'jest-sonar',
{
outputDirectory: './tmp/results',
outputName: 'sonar-report.xml',
reportedFilePath: 'absolute'
}
]
],
resolver: '@nx/jest/plugins/resolver',
snapshotFormat: { escapeString: true, printBasicPrototype: true },
testMatch: ['**/+(*.)+(spec|test).+(ts|js)?(x)'],
transform: {
'^.+\\.(ts|html)$': 'jest-preset-angular'
},
verbose: false
};