generated from valora-inc/typescript-app-starter
-
Notifications
You must be signed in to change notification settings - Fork 2
/
jest.config.js
27 lines (26 loc) · 869 Bytes
/
jest.config.js
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
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
moduleFileExtensions: ['ts', 'js', 'json', 'tsx', 'jsx', 'json', 'node'],
moduleDirectories: ['node_modules', '<rootDir>'],
preset: 'ts-jest',
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
testEnvironment: 'jsdom',
transform: {
'^.+\\.(ts|tsx)$': ['ts-jest', { tsconfig: 'tsconfig.json' }],
'^.+\\.(js|jsx)$': 'babel-jest',
},
transformIgnorePatterns: [],
collectCoverageFrom: ['./src/**/*.ts'],
coveragePathIgnorePatterns: ['/node_modules/'],
coverageThreshold: {
global: {
lines: 75,
},
},
moduleNameMapper: {
'\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/mocks/image-mock.js',
'\\.(css|less)$': 'identity-obj-proxy',
'@fontsource/inter': 'identity-obj-proxy',
},
}