-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
27 lines (26 loc) · 829 Bytes
/
jest.config.js
File metadata and controls
27 lines (26 loc) · 829 Bytes
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
const { pathsToModuleNameMapper } = require('ts-jest');
const { compilerOptions } = require('./tsconfig');
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['src', '.aws'],
clearMocks: true,
moduleNameMapper: {
'^@utils/log$': '<rootDir>/src/utils/__mocks__/logMock.ts',
'^google-spreadsheet$': '<rootDir>/src/__mocks__/google-spreadsheet.ts',
'^google-auth-library$': '<rootDir>/src/__mocks__/google-auth-library.ts',
// TSConfig Paths need to be last
...pathsToModuleNameMapper(compilerOptions.paths, { prefix: '<rootDir>/' }),
},
collectCoverage: true,
coverageDirectory: 'coverage',
coverageThreshold: {
global: {
branches: 55,
functions: 75,
lines: 80,
statements: 75,
},
},
coveragePathIgnorePatterns: ['src/utils/log.ts'],
};