-
Notifications
You must be signed in to change notification settings - Fork 5
/
jest.config.ts
42 lines (39 loc) · 1.24 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
import type { Config } from 'jest'
import dotenv from 'dotenv'
dotenv.config()
const config: Config = {
moduleFileExtensions: [
'js',
'json',
'ts'
],
rootDir: '.',
testRegex: '.*\\.spec\\.ts$',
transform: {
'^.+\\.(t|j)s$': 'ts-jest'
},
collectCoverageFrom: [
'**/*.(t|j)s'
],
coverageDirectory: './coverage',
testEnvironment: 'node',
roots: [
'<rootDir>/apps/',
'<rootDir>/libs/',
'<rootDir>/tests/',
'<rootDir>/scripts/'
],
moduleNameMapper: {
'^@app/common(|/.*)$': '<rootDir>/libs/common/src$1',
'^@app/accounts-service(|/.*)$': '<rootDir>/apps/charge-accounts-service/src$1',
'^@app/api-service(|/.*)$': '<rootDir>/apps/charge-api-service/src$1',
'^@app/notifications-service(|/.*)$': '<rootDir>/apps/charge-notifications-service/src$1',
'^@app/relay-service(|/.*)$': '<rootDir>/apps/charge-relay-service/src$1',
'^@app/network-service(|/.*)$': '<rootDir>/apps/charge-network-service/src$1',
'^@app/apps-service(|/.*)$': '<rootDir>/apps/charge-apps-service/src$1',
'^@app/smart-wallets-service(|/.*)$': '<rootDir>/apps/charge-smart-wallets-service/src$1',
'^@scripts(|/.*)$': '<rootDir>/scripts$1',
'^axios$': require.resolve('axios')
}
}
export default config