-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
31 lines (31 loc) · 919 Bytes
/
jest.config.js
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
module.exports = {
collectCoverage: false, // Qualquer teste gera um coverage
collectCoverageFrom: [
'<rootDir>/src/**/*.ts',
'!<rootDir>/src/main/**',
'!<rootDir>/src/**/index.ts'
], // Definir a partir de qual pasta gerar os testes
coverageDirectory: 'coverage', // Gerar pasta separada de coverages
coverageProvider: 'babel',
moduleNameMapper: {
'@/tests/(.+)': '<rootDir>/tests/$1',
'@data/(.*)': '<rootDir>/src/data/$1',
'@util/(.*)': '<rootDir>/src/util/$1',
'@infra/(.*)': '<rootDir>/src/infra/$1',
'@domain/(.*)': '<rootDir>/src/domain/$1',
'@main/(.*)': '<rootDir>/src/main/$1',
'@app/(.*)': '<rootDir>/src/app/$1'
},
testMatch: ['**/**.spec.ts'],
modulePaths: [
'<rootDir>',
'/home/some/other/path'
],
roots: [
'<rootDir>/src',
'<rootDir>/tests'
], // Onde fica o diretorio de testes
transform: {
'\\.ts$': 'ts-jest'
}
}