-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathjest.config.ts
More file actions
42 lines (39 loc) · 1.13 KB
/
Copy pathjest.config.ts
File metadata and controls
42 lines (39 loc) · 1.13 KB
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
40
41
42
import { Config } from '@jest/types';
import { createEsmPreset } from 'jest-preset-angular/presets';
const preset = createEsmPreset();
const config: Config.InitialOptions = {
...preset,
// Angular packages ship ESM (.mjs); allow transforming those in node_modules
transformIgnorePatterns: [
'node_modules/(?!(.*\\.mjs$|@angular/common/locales/.*\\.js$|tslib))',
],
transform: {
'^.+\\.(ts|js|mjs|html|svg)$': [
'jest-preset-angular',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
useESM: true,
},
],
},
testMatch: ['<rootDir>/src/**/*.+(spec|test).+(ts|js)?(x)'],
testEnvironment: 'jsdom',
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
coverageReporters: ['text', 'html'],
coverageDirectory: '<rootDir>/coverage',
modulePathIgnorePatterns: [
'<rootDir>/release',
'<rootDir>/dist',
'<rootDir>/stories',
],
coveragePathIgnorePatterns: [
'<rootDir>/release',
'<rootDir>/dist',
'<rootDir>/stories',
'(\\w*/)*(\\w|\\.)+\\.html',
'(\\w*/)*index\\.ts',
'/node_modules/',
],
};
export default config;