Skip to content

Commit b6889bc

Browse files
committed
[jest] Add coverage options
1 parent 3f0be90 commit b6889bc

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

jest.config.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@ module.exports = {
22
clearMocks: true,
33
moduleFileExtensions: ['js', 'ts'],
44
testEnvironment: 'node',
5-
testMatch: ['**/*.test.ts'],
5+
testMatch: ['**/__tests__/*.test.ts'],
66
testRunner: 'jest-circus/runner',
77
transform: {
88
'^.+\\.ts$': 'ts-jest'
99
},
10-
verbose: true
10+
verbose: true,
11+
collectCoverage: true,
12+
collectCoverageFrom: [
13+
'**/src/*.ts',
14+
'!**/node_modules/**'
15+
]
1116
}

0 commit comments

Comments
 (0)