chronocat/jest.config.ts

41 lines
901 B
TypeScript
Raw Permalink Normal View History

2024-03-03 15:49:16 +00:00
import type { JestConfigWithTsJest } from 'ts-jest'
const config: JestConfigWithTsJest = {
preset: 'ts-jest/presets/default-esm',
moduleNameMapper: {
2024-03-13 14:21:27 +00:00
'@chronocat/red': '@chronocat/red/src',
2024-03-03 15:49:16 +00:00
'^(\\.{1,2}/.*)\\.js$': '$1',
},
transform: {
'^.+\\.m?[tj]sx?$': [
'ts-jest',
{
useESM: true,
},
],
},
collectCoverage: true,
coverageDirectory: 'coverage',
coverageProvider: 'v8',
2024-04-05 19:11:22 +00:00
reporters: [
'default',
[
'jest-junit',
{
suiteName: 'Chronocat Unit Tests',
outputDirectory: 'coverage',
outputName: 'jest-junit.xml',
ancestorSeparator: ' ',
uniqueOutputName: 'false',
suiteNameTemplate: '{filepath}',
classNameTemplate: '{classname}',
titleTemplate: '{title}',
},
],
],
2024-03-03 15:49:16 +00:00
}
// eslint-disable-next-line import/no-default-export
export default config