tududi/jest.config.js
Chris 3c1209a5a9
Express migration (#80)
* Initial migration

* Cleanup and create migration scripts

* Introduce test suite

* Fix test issues

* Correct CORS issue and update paths

* Update README
2025-06-16 21:50:44 +03:00

28 lines
No EOL
860 B
JavaScript

module.exports = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
roots: ['<rootDir>/frontend'],
testMatch: [
'<rootDir>/frontend/**/__tests__/**/*.{test,spec}.{js,jsx,ts,tsx}',
'<rootDir>/frontend/**/*.(test|spec).{js,jsx,ts,tsx}'
],
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
'^.+\\.(js|jsx)$': 'babel-jest'
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
setupFilesAfterEnv: ['<rootDir>/frontend/__tests__/setup.ts'],
moduleNameMapping: {
'\\.(css|less|scss|sass)$': 'identity-obj-proxy',
'^@/(.*)$': '<rootDir>/frontend/$1'
},
collectCoverageFrom: [
'frontend/**/*.{ts,tsx}',
'!frontend/**/*.d.ts',
'!frontend/index.tsx',
'!frontend/**/__tests__/**',
'!frontend/**/node_modules/**'
],
coverageDirectory: 'coverage-frontend',
coverageReporters: ['text', 'lcov', 'html']
};