/** @type {import('ts-jest').JestConfigWithTsJest} */ module.exports = { preset: 'ts-jest', testEnvironment: 'node', extensionsToTreatAsEsm: ['.ts'], moduleNameMapper: { '^(\\.{1,2}/.*)\\.js$': '$1', }, transform: { '^.+\\.tsx?$': [ 'ts-jest', { useESM: true, }, ], }, transformIgnorePatterns: [ 'node_modules/(?!(chalk)/)', ], testMatch: ['**/__tests__/**/*.test.ts'], collectCoverageFrom: [ '**/*.ts', '!**/__tests__/**', '!**/dist/**', ], }