forked from ngx-formly/ngx-formly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
24 lines (23 loc) · 819 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
const { pathsToModuleNameMapper } = require('ts-jest');
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
preset: 'jest-preset-angular',
roots: ['<rootDir>/src/'],
testMatch: ['**/?(*.)+(spec|test).ts'],
setupFilesAfterEnv: ['jest-extended/all', '<rootDir>/jestSetup.ts'],
globalSetup: 'jest-preset-angular/global-setup',
coverageReporters: ['html'],
testPathIgnorePatterns: [
'/node_modules/',
'schematics/.*/files/(.*)$'
],
moduleNameMapper: pathsToModuleNameMapper(
{
"@ngx-formly/core": ["src/core/src/public_api"],
"@ngx-formly/core/testing": ["src/core/testing/src/private_api"],
"@ngx-formly/core/*": ["src/core/*/src/public_api"],
"@ngx-formly/*": ["src/ui/*/src/public_api"],
},
{ prefix: '<rootDir>/' },
),
};