tercul-frontend/jest.config.cjs
Damir Mukimov 9d5aca38d5
fix: resolve remaining TypeScript errors and improve type safety
- Fix tag-manager component to work with string IDs from schema
- Update author-stats component to use schema-based AuthorWithStats type
- Add missing utility functions (formatNumber, formatRating) to author utils
- Fix WorkCard test to use correct schema types with string IDs
- Resolve type mismatches in component props and form handling
- Update interface definitions to match schema requirements

Linting:  90%+ resolved, remaining minor issues
Testing: ⚠️ ES module configuration needs refinement
2025-11-30 15:09:55 +01:00

28 lines
752 B
JavaScript

module.exports = {
preset: null,
testEnvironment: 'jest-environment-jsdom',
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
extensionsToTreatAsEsm: ['.ts', '.tsx'],
globals: {
'ts-jest': {
useESM: true,
},
},
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', { useESM: true }],
},
transformIgnorePatterns: [
'/node_modules/(?!wouter|lucide-react)/',
],
testMatch: [
'<rootDir>/client/src/**/__tests__/**/*.(ts|tsx)',
'<rootDir>/client/src/**/*.(test|spec).(ts|tsx)',
],
};