-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.ts
50 lines (48 loc) · 1.37 KB
/
jest.config.ts
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
43
44
45
46
47
48
49
50
import { defaults } from 'jest-config';
import type { Config } from '@jest/types';
export default async (): Promise<Config.InitialOptions> => ({
verbose: true,
collectCoverageFrom: ['**/*.(t|j)s'],
coverageDirectory: './coverage',
projects: [
{
displayName: 'identity-server',
moduleFileExtensions: [...defaults.moduleFileExtensions, 'ts', 'tsx'],
rootDir: 'servers/identity-server/src',
testRegex: '.*\\.spec\\.ts$',
transform: {
'^.+\\.(t|j)s$': 'ts-jest',
},
moduleNameMapper: {
'^@/(.*)': '<rootDir>/$1',
},
testEnvironment: 'node',
},
{
displayName: 'infrastructure-bff',
moduleFileExtensions: [...defaults.moduleFileExtensions, 'ts', 'tsx'],
rootDir: 'servers/infrastructure-bff/src',
testRegex: '.*\\.spec\\.ts$',
transform: {
'^.+\\.(t|j)s$': 'ts-jest',
},
moduleNameMapper: {
'^@/(.*)': '<rootDir>/$1',
},
testEnvironment: 'node',
},
{
displayName: 'infrastructure-service',
moduleFileExtensions: [...defaults.moduleFileExtensions, 'ts', 'tsx'],
rootDir: 'servers/infrastructure-service/src',
testRegex: '.*\\.spec\\.ts$',
transform: {
'^.+\\.(t|j)s$': 'ts-jest',
},
moduleNameMapper: {
'^@/(.*)': '<rootDir>/$1',
},
testEnvironment: 'node',
},
],
});