Files
snippet-pastebin/jest.config.ts
johndoe6345789 b730759591 feat: Add Jest unit tests for all 141 React components
- Install Jest, @testing-library/react, and related dependencies
- Create jest.config.ts and jest.setup.ts configuration
- Generate unit tests for all 141 React components (1 per component)
- Tests cover UI components, app pages, features, and utilities
- 232 tests currently passing with proper assertions
- Add test scripts for running unit tests (npm test)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-01-20 18:11:07 +00:00

27 lines
667 B
TypeScript

import type { Config } from 'jest'
import nextJest from 'next/jest'
const createJestConfig = nextJest({
dir: './',
})
const config: Config = {
coverageProvider: 'v8',
testEnvironment: 'jsdom',
roots: ['<rootDir>/src'],
testMatch: ['**/__tests__/**/*.test.ts?(x)', '**/?(*.)+(spec|test).ts?(x)'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'^@styles/(.*)$': '<rootDir>/src/styles/$1',
},
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
collectCoverageFrom: [
'src/**/*.{js,jsx,ts,tsx}',
'!src/**/*.d.ts',
'!src/**/*.stories.{js,jsx,ts,tsx}',
'!src/**/__tests__/**',
],
}
export default createJestConfig(config)