Skip to content

Commit 36c1ec5

Browse files
committed
Include all ts/tsx files in coverage
1 parent aec9600 commit 36c1ec5

File tree

5 files changed

+36
-12
lines changed

5 files changed

+36
-12
lines changed

backend/api/jest.config.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,10 @@ module.exports = {
2222
'ts-jest': {
2323
tsconfig: '<rootDir>/tsconfig.json'
2424
}
25-
}
25+
},
26+
27+
collectCoverageFrom: [
28+
"src/**/*.{ts,tsx}",
29+
"!src/**/*.d.ts"
30+
],
2631
};

backend/email/jest.config.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,10 @@ module.exports = {
2222
'ts-jest': {
2323
tsconfig: '<rootDir>/tsconfig.json'
2424
}
25-
}
25+
},
26+
27+
collectCoverageFrom: [
28+
"src/**/*.{ts,tsx}",
29+
"!src/**/*.d.ts"
30+
],
2631
};

backend/shared/jest.config.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,10 @@ module.exports = {
2222
'ts-jest': {
2323
tsconfig: '<rootDir>/tsconfig.json'
2424
}
25-
}
25+
},
26+
27+
collectCoverageFrom: [
28+
"src/**/*.{ts,tsx}",
29+
"!src/**/*.d.ts"
30+
],
2631
};

common/jest.config.js

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
/** @type {import('ts-jest').JestConfigWithTsJest} */
2-
const { pathsToModuleNameMapper } = require('ts-jest')
3-
const { compilerOptions } = require('./tsconfig')
2+
const {pathsToModuleNameMapper} = require('ts-jest')
3+
const {compilerOptions} = require('./tsconfig')
44

55
module.exports = {
6-
preset: 'ts-jest',
7-
testEnvironment: 'node',
8-
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
9-
prefix: '<rootDir>/',
10-
}),
11-
testMatch: ['**/*.test.ts'],
6+
preset: 'ts-jest',
7+
testEnvironment: 'node',
8+
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
9+
prefix: '<rootDir>/',
10+
}),
11+
testMatch: ['**/*.test.ts'],
12+
collectCoverageFrom: [
13+
"src/**/*.{ts,tsx}",
14+
"!src/**/*.d.ts"
15+
],
1216
}

web/jest.config.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,10 @@ module.exports = {
2222
'ts-jest': {
2323
tsconfig: '<rootDir>/tsconfig.json'
2424
}
25-
}
25+
},
26+
27+
collectCoverageFrom: [
28+
"src/**/*.{ts,tsx}",
29+
"!src/**/*.d.ts"
30+
],
2631
};

0 commit comments

Comments
 (0)