mirror of
https://github.com/di-sukharev/opencommit.git
synced 2026-04-20 03:02:51 -04:00
22 lines
456 B
TypeScript
22 lines
456 B
TypeScript
import type { JestConfigWithTsJest } from 'ts-jest';
|
|
|
|
const jestConfig: JestConfigWithTsJest = {
|
|
// [...]
|
|
extensionsToTreatAsEsm: ['.ts'],
|
|
moduleNameMapper: {
|
|
'^(\\.{1,2}/.*)\\.js$': '$1'
|
|
},
|
|
transform: {
|
|
// '^.+\\.[tj]sx?$' to process js/ts with `ts-jest`
|
|
// '^.+\\.m?[tj]sx?$' to process js/ts/mjs/mts with `ts-jest`
|
|
'^.+\\.tsx?$': [
|
|
'ts-jest',
|
|
{
|
|
useESM: true
|
|
}
|
|
]
|
|
}
|
|
};
|
|
|
|
export default jestConfig;
|