mirror of
https://github.com/SamyRai/tercul-frontend.git
synced 2025-12-27 04:51:34 +00:00
- Configure Jest to work with ES modules (type: module in package.json) - Update Babel config with modules: false for proper ES module handling - Convert jest.setup.js to use ES module import syntax - Add experimental VM modules support for Jest execution Note: Testing infrastructure is in place but may need additional configuration for full compatibility with the project's ES module setup.
18 lines
516 B
JavaScript
18 lines
516 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',
|
|
},
|
|
transform: {
|
|
'^.+\\\\.tsx?$': ['babel-jest', { useESM: true }],
|
|
},
|
|
transformIgnorePatterns: [
|
|
'/node_modules/(?!wouter|lucide-react)/',
|
|
],
|
|
};
|