-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathjest.config.js
More file actions
30 lines (28 loc) · 834 Bytes
/
jest.config.js
File metadata and controls
30 lines (28 loc) · 834 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
28
29
30
const { pathsToModuleNameMapper } = require('ts-jest/utils');
const { compilerOptions } = require('./tsconfig');
const jestConfig = async () => ({
preset: 'ts-jest',
testEnvironment: 'node',
rootDir: '.',
testMatch: ['<rootDir>/@(@serverlessly|packages)/**/__tests__/**/*.test.ts'],
moduleFileExtensions: ['ts', 'js', 'json', 'node'],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
prefix: '<rootDir>/',
}),
collectCoverage: true,
collectCoverageFrom: [
'<rootDir>/@(@serverlessly|packages)/**/*.ts',
'!<rootDir>/**/__tests__/**',
'!<rootDir>/**/node_modules/**',
],
coverageThreshold: {
global: {
branches: 100,
functions: 100,
lines: 100,
statements: 100,
},
},
cacheDirectory: '<rootDir>/.cache/jest',
});
module.exports = jestConfig;