-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
I am having a TypeScript project, with following jest.config.mjs
:
/** @type {import('ts-jest').JestConfigWithTsJest} */
export default {
testEnvironment: 'node',
detectOpenHandles: true,
verbose: true,
cache: true,
bail: 1,
rootDir: '.',
roots: ['<rootDir>/'],
testMatch: ['<rootDir>/src/_tests/**/*.(spec|test).ts'],
testPathIgnorePatterns: ['<rootDir>/node_modules/'],
collectCoverageFrom: ['<rootDir>/src/**/*.ts'],
coverageDirectory: '<rootDir>/coverage/',
coverageReporters: ['none'],
reporters: [
'default',
[
'jest-monocart-coverage',
{
reports: [['html'], ['cobertura'], ['console-details']],
outputDir: './coverage',
},
],
[
'jest-junit',
{
outputDirectory: '<rootDir>/coverage/',
outputName: 'junit.xml',
suiteName: 'Tests',
classNameTemplate: '{classname}',
ancestorSeparator: ' > ',
},
],
],
transform: {
'^.+.tsx?$': ['ts-jest', {}],
},
transformIgnorePatterns: ['node_modules'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
},
coverageProvider: 'v8',
passWithNoTests: true,
forceExit: true,
};
When I am running the tests with jest --coverage
, the file contents are compiled JS, not TS.
How can I have them as actual TS content?
Example:
Metadata
Metadata
Assignees
Labels
No labels