Files

26 lines
622 B
TypeScript
Raw Permalink Normal View History

2026-03-26 15:22:04 -05:00
import type { Config } from 'jest';
import nextJest from 'next/jest.js';
2023-04-07 23:18:45 -05:00
const createJestConfig = nextJest({
dir: './',
});
2026-03-26 15:22:04 -05:00
const config: Config = {
2023-04-07 23:18:45 -05:00
testEnvironment: 'jest-environment-jsdom',
clearMocks: true,
collectCoverage: true,
collectCoverageFrom: [
2023-04-26 06:47:11 -05:00
'./src/**/*.(ts|tsx)',
2023-04-07 23:18:45 -05:00
'!**/tests/**',
'!/node_modules',
2023-04-26 06:47:11 -05:00
'!./src/docs/**',
2023-04-07 23:18:45 -05:00
],
coverageDirectory: 'coverage',
coverageReporters: ['json', 'text', 'html'],
2023-04-26 06:47:11 -05:00
testMatch: ['**/tests/**/*.(test|spec|jest).(ts|tsx)'],
2023-04-07 23:18:45 -05:00
testPathIgnorePatterns: ['tests/(setup|testUtils).ts'],
verbose: true,
};
export default createJestConfig(config);