-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
34 lines (34 loc) · 938 Bytes
/
Copy pathjest.config.js
File metadata and controls
34 lines (34 loc) · 938 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
31
32
33
34
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>/src'],
testMatch: ['**/*.test.ts'],
passWithNoTests: true,
collectCoverageFrom: [
'src/**/*.ts',
'!src/**/*.d.ts',
'!src/**/__tests__/**',
'!src/**/*.test.ts'
],
coverageThreshold: {
global: {
lines: 90,
statements: 90,
functions: 88,
branches: 82
}
},
coverageDirectory: 'coverage',
coverageReporters: ['text', 'text-summary', 'lcov', 'json-summary'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
moduleNameMapper: {
// @actions/github v8 exposes an ESM Octokit dependency. The published
// action is bundled by ncc, while Jest exercises this external boundary
// through explicit mocks and this stable test double.
'^@actions/github$': '<rootDir>/test-support/actions-github.cjs'
},
transform: {
'^.+\\.ts$': 'ts-jest'
},
verbose: true
};