forked from miksrv/developer-portfolio-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.ts
32 lines (30 loc) · 861 Bytes
/
jest.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import type { Config } from 'jest'
const config: Config = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
moduleNameMapper: {
'\\.(css|sass|scss)$': 'identity-obj-proxy',
'\\.(jpg|jpeg|png)$': 'identity-obj-proxy',
'^@/(.*)$': '<rootDir>/$1'
},
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
babel: true,
tsconfig: 'tsconfig.jest.json'
}
]
},
collectCoverageFrom: [
'components/**/*.{ts,tsx}',
'!components/**/*.d.ts',
'!components/**/*.test.tsx',
'!components/**/index.ts',
'!components/**/data.ts',
'!*.d.ts'
],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
transformIgnorePatterns: ['node_modules/(?!(module-to-transform)/)', '/.next/']
}
export default config