Include all ts/tsx files in coverage

This commit is contained in:
MartinBraquet
2025-11-15 00:52:37 +01:00
parent aec9600036
commit 36c1ec528a
5 changed files with 36 additions and 12 deletions

View File

@@ -22,5 +22,10 @@ module.exports = {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.json'
}
}
},
collectCoverageFrom: [
"src/**/*.{ts,tsx}",
"!src/**/*.d.ts"
],
};

View File

@@ -22,5 +22,10 @@ module.exports = {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.json'
}
}
},
collectCoverageFrom: [
"src/**/*.{ts,tsx}",
"!src/**/*.d.ts"
],
};

View File

@@ -22,5 +22,10 @@ module.exports = {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.json'
}
}
},
collectCoverageFrom: [
"src/**/*.{ts,tsx}",
"!src/**/*.d.ts"
],
};

View File

@@ -1,12 +1,16 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
const { pathsToModuleNameMapper } = require('ts-jest')
const { compilerOptions } = require('./tsconfig')
const {pathsToModuleNameMapper} = require('ts-jest')
const {compilerOptions} = require('./tsconfig')
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
prefix: '<rootDir>/',
}),
testMatch: ['**/*.test.ts'],
preset: 'ts-jest',
testEnvironment: 'node',
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
prefix: '<rootDir>/',
}),
testMatch: ['**/*.test.ts'],
collectCoverageFrom: [
"src/**/*.{ts,tsx}",
"!src/**/*.d.ts"
],
}

View File

@@ -22,5 +22,10 @@ module.exports = {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.json'
}
}
},
collectCoverageFrom: [
"src/**/*.{ts,tsx}",
"!src/**/*.d.ts"
],
};