front/jest.config.ts

23 lines
712 B
TypeScript
Raw Normal View History

2024-10-19 07:48:30 +03:00
import type { Config } from 'jest';
import { defaults } from 'jest-config';
const config: Config = {
clearMocks: true,
collectCoverage: true,
2024-10-19 08:44:11 +03:00
collectCoverageFrom: [
"src/components/**/*.{js,jsx,ts,tsx}", // Include all components
"!src/**/*.test.{js,jsx,ts,tsx}", // Exclude test files
"!src/**/index.{js,jsx,ts,tsx}", // Optionally exclude index files
],
2024-10-19 07:48:30 +03:00
coverageDirectory: "coverage",
coverageProvider: "v8",
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
testEnvironment: "jsdom",
2024-10-19 10:13:06 +03:00
// transform: {
// '^.+\\.(ts|tsx|js|jsx)$': 'babel-jest',
// },
2024-10-19 07:48:30 +03:00
moduleFileExtensions: [...defaults.moduleFileExtensions, 'ts', 'tsx', 'js', 'jsx'],
};
export default config;