mirror of
https://github.com/chrononeko/chronocat.git
synced 2024-11-24 09:15:52 +00:00
41 lines
901 B
TypeScript
41 lines
901 B
TypeScript
import type { JestConfigWithTsJest } from 'ts-jest'
|
||
|
||
const config: JestConfigWithTsJest = {
|
||
preset: 'ts-jest/presets/default-esm',
|
||
moduleNameMapper: {
|
||
'@chronocat/red': '@chronocat/red/src',
|
||
'^(\\.{1,2}/.*)\\.js$': '$1',
|
||
},
|
||
transform: {
|
||
'^.+\\.m?[tj]sx?$': [
|
||
'ts-jest',
|
||
{
|
||
useESM: true,
|
||
},
|
||
],
|
||
},
|
||
collectCoverage: true,
|
||
coverageDirectory: 'coverage',
|
||
coverageProvider: 'v8',
|
||
|
||
reporters: [
|
||
'default',
|
||
[
|
||
'jest-junit',
|
||
{
|
||
suiteName: 'Chronocat Unit Tests',
|
||
outputDirectory: 'coverage',
|
||
outputName: 'jest-junit.xml',
|
||
ancestorSeparator: ' › ',
|
||
uniqueOutputName: 'false',
|
||
suiteNameTemplate: '{filepath}',
|
||
classNameTemplate: '{classname}',
|
||
titleTemplate: '{title}',
|
||
},
|
||
],
|
||
],
|
||
}
|
||
|
||
// eslint-disable-next-line import/no-default-export
|
||
export default config
|