forked from storybookjs/storybook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
31 lines (30 loc) · 967 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
const path = require('path');
module.exports = {
displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep),
preset: 'jest-preset-angular/presets/defaults-esm',
setupFilesAfterEnv: ['<rootDir>/setup-jest.ts'],
transformIgnorePatterns: ['/node_modules/(?!@angular|rxjs|nanoid|uuid)'],
snapshotFormat: {
escapeString: true,
printBasicPrototype: true,
},
coverageDirectory: './coverage/testapp',
transform: {
'^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
],
},
snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
],
testMatch: [
'<rootDir>/src/**/__tests__/**/*.[jt]s?(x)',
'<rootDir>/src/**/?(*.)+(spec|test).[jt]s?(x)',
],
};