mirror of
https://github.com/di-sukharev/opencommit.git
synced 2026-01-09 13:48:11 -05:00
- Fixed Jest configuration error by removing duplicate modulePathIgnorePatterns property - Consolidated the ignore patterns into a single declaration - This resolves the TypeScript compilation error preventing tests from running
43 lines
1.0 KiB
TypeScript
43 lines
1.0 KiB
TypeScript
/**
|
|
* For a detailed explanation regarding each configuration property, visit:
|
|
* https://jestjs.io/docs/configuration
|
|
*/
|
|
|
|
import type { Config } from 'jest';
|
|
|
|
const config: Config = {
|
|
testTimeout: 100_000,
|
|
coverageProvider: 'v8',
|
|
moduleDirectories: ['node_modules', 'src'],
|
|
preset: 'ts-jest/presets/default-esm',
|
|
setupFilesAfterEnv: ['<rootDir>/test/jest-setup.ts'],
|
|
testEnvironment: 'node',
|
|
testRegex: ['.*\\.test\\.ts$'],
|
|
// Tell Jest to ignore the specific duplicate package.json files
|
|
// that are causing Haste module naming collisions
|
|
modulePathIgnorePatterns: [
|
|
'<rootDir>/test/e2e/prompt-module/data/'
|
|
],
|
|
transformIgnorePatterns: [
|
|
'node_modules/(?!(cli-testing-library|@clack|cleye)/.*)'
|
|
],
|
|
transform: {
|
|
'^.+\\.(ts|tsx|js|jsx|mjs)$': [
|
|
'ts-jest',
|
|
{
|
|
diagnostics: false,
|
|
useESM: true,
|
|
tsconfig: {
|
|
module: 'ESNext',
|
|
target: 'ES2022'
|
|
}
|
|
}
|
|
]
|
|
},
|
|
moduleNameMapper: {
|
|
'^(\\.{1,2}/.*)\\.js$': '$1'
|
|
}
|
|
};
|
|
|
|
export default config;
|