Files
snippet-pastebin/jest.config.ts
johndoe6345789 0011a2527a test: All 283 quality-validator tests passing - 100% success rate
- Fixed Jest configuration to discover tests in tests/ directory
- Added tests/ root directory to jest.config.ts
- Fixed 2 test calculation errors in scoring and analyzer tests
- All 5 test modules now passing:
  * types.test.ts (25 tests)
  * index.test.ts (32 tests)
  * analyzers.test.ts (91 tests)
  * scoring-reporters.test.ts (56 tests)
  * config-utils.test.ts (83 tests)
- Comprehensive coverage of all 4 analysis engines
- Test execution time: 368ms for 283 tests
- Ready for production deployment

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-01-20 23:22:26 +00:00

27 lines
686 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', '<rootDir>/tests'],
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)