-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.ts
35 lines (32 loc) · 880 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
35
import type { Config } from '@jest/types'
const common = {
preset: 'ts-jest',
testEnvironment: 'node',
clearMocks: true,
testMatch: ['<rootDir>/**/*.spec.ts'],
collectCoverageFrom: ['<rootDir>/src/**/*.ts'],
}
const config: Config.InitialOptions = {
extensionsToTreatAsEsm: ['.ts', '.tsx'],
collectCoverage: true,
coverageReporters: ['lcov', 'text-summary'],
projects: [
{
...common,
displayName: 'api',
rootDir: './api',
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
},
{
...common,
displayName: 'graphql-codegen-operations-safelist',
rootDir: './packages/graphql-codegen-operations-safelist',
},
{
...common,
displayName: 'graphql-codegen-typescript-operations-tester',
rootDir: './packages/graphql-codegen-typescript-operations-tester',
},
],
}
export default config