chronocat/jest.config.ts
2024-03-13 22:22:27 +08:00

24 lines
509 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',
}
// eslint-disable-next-line import/no-default-export
export default config