-
Notifications
You must be signed in to change notification settings - Fork 93
/
jest.integration.config.ts
47 lines (45 loc) · 1.21 KB
/
jest.integration.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
import { Config } from '@jest/types'
import { defaults as tsjPreset } from 'ts-jest/presets'
const config: Config.InitialOptions = {
preset: 'ts-jest',
projects: [
{
rootDir: 'packages/bp/src',
displayName: { name: 'botpress', color: 'blue' },
globals: {
'ts-jest': {
tsconfig: '<rootDir>../tsconfig.json'
}
},
modulePaths: ['<rootDir>/'],
transform: {
...tsjPreset.transform
},
moduleNameMapper: {
'^botpress/sdk$': '<rootDir>/core/app/sdk_impl'
},
testMatch: ['**/(src|test)/**/*.integration.test.(ts|js)'],
testEnvironment: 'node'
},
{
rootDir: 'modules',
displayName: { name: 'modules', color: 'red' },
globals: {
'ts-jest': {
tsconfig: '<rootDir>../packages/bp/tsconfig.json',
diagnostics: false
}
},
modulePaths: ['<rootDir>/../packages/bp/src'],
transform: {
...tsjPreset.transform
},
moduleNameMapper: {
'^botpress/sdk$': '<rootDir>/../packages/bp/src/core/app/sdk_impl'
},
testMatch: ['**/(src|test)/**/*.integration.test.(ts|js)'],
testEnvironment: 'node'
}
]
}
export default config