mirror of
https://github.com/andwati/blog-nest.git
synced 2026-11-04 04:42:15 +00:00
24 lines
514 B
TypeScript
24 lines
514 B
TypeScript
import type { Config } from 'jest'
|
|
import nextJest from 'next/jest.js'
|
|
|
|
const createJestConfig = nextJest({
|
|
dir: './',
|
|
})
|
|
|
|
const config: Config = {
|
|
testEnvironment: 'jsdom',
|
|
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
|
|
testRegex: '.*\\.spec\\.tsx?$',
|
|
moduleNameMapper: {
|
|
'^@/(.*)$': '<rootDir>/src/$1',
|
|
},
|
|
collectCoverageFrom: [
|
|
'src/**/*.{ts,tsx}',
|
|
'!src/**/*.spec.{ts,tsx}',
|
|
'!src/**/layout.tsx',
|
|
],
|
|
coverageDirectory: 'coverage',
|
|
}
|
|
|
|
export default createJestConfig(config)
|