tercul-frontend/jest.config.cjs
Damir Mukimov 790d32cce0
fix: complete TypeScript fixes and testing refinements
- Fix remaining AnnotationSystem component type issues
- Update FilterSidebar to use string tag IDs
- Resolve all major TypeScript compilation errors
- Testing infrastructure fully functional with Jest + ES modules
- Linting errors reduced to minor unused variable warnings

All critical type safety and testing issues resolved!
2025-11-30 15:16:06 +01:00

30 lines
802 B
JavaScript

module.exports = {
preset: null,
testEnvironment: 'jest-environment-jsdom',
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
extensionsToTreatAsEsm: ['.ts', '.tsx'],
moduleNameMapper: {
'\\\\.(css|less|scss|sass)$': 'identity-obj-proxy',
'\\\\.(gif|ttf|eot|svg|png)$': 'jest-transform-stub',
'^@/(.*)$': '<rootDir>/client/src/$1',
'^@shared/(.*)$': '<rootDir>/shared/$1',
},
transform: {
'^.+\\\\.tsx?$': 'babel-jest',
},
transformIgnorePatterns: [
'node_modules/(?!(wouter|lucide-react)/)',
],
testMatch: [
'<rootDir>/client/src/**/__tests__/**/*.(ts|tsx)',
'<rootDir>/client/src/**/*.(test|spec).(ts|tsx)',
],
// ES Module support
extensionsToTreatAsEsm: ['.ts', '.tsx'],
globals: {
'babel-jest': {
useESM: true,
},
},
};