-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjest.config.ts
34 lines (32 loc) · 984 Bytes
/
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
import { JestConfigWithTsJest } from 'ts-jest';
const config: JestConfigWithTsJest = {
preset: 'ts-jest',
testEnvironment: 'node',
collectCoverage: true,
collectCoverageFrom: ['src/**/*.ts'],
coverageReporters: ['html', 'json', 'lcov', 'text', 'clover'],
coverageDirectory: 'coverage',
coveragePathIgnorePatterns: [
'/node_modules/',
'/test/',
'/mocks/',
'/index.ts',
'/index.js',
'.typedefs.ts',
'/src/utils/redis/redis.ts',
'/src/handlers/graphql.ts',
],
transform: {
'\\.[jt]sx?$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
},
setupFiles: ['<rootDir>/.jest/set-env-vars.ts'],
moduleNameMapper: {
'^@handlers/(.*)$': ['<rootDir>/src/handlers/$1'],
'^@models/(.*)$': ['<rootDir>/src/models/$1'],
'^@schema/(.*)$': ['<rootDir>/src/schema/$1'],
'^@customTypes/(.*)$': ['<rootDir>/src/types/$1'],
'^@utils/(.*)$': ['<rootDir>/src/utils/$1'],
'^@generated/(.*)$': ['<rootDir>/src/generated/$1'],
},
};
export default config;