-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathjest.config.ts
31 lines (29 loc) · 934 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
import type { Config } from '@jest/types';
const config: Config.InitialOptions = {
preset: 'ts-jest',
runner: 'jest-electron/runner',
testEnvironment: 'jest-electron/environment',
verbose: true,
transform: {
'^.+\\.(t|j)sx?$': 'ts-jest',
},
setupFiles: ['./tests/setup.ts'],
moduleNameMapper: {
'^uuid$': '<rootDir>/test/__mocks__/uuid.ts',
'html2sketch/(.*)$': '<rootDir>/src/$1',
html2sketch: '<rootDir>/src',
'@test-utils': '<rootDir>/tests/__utils__',
},
testTimeout: 30000,
testMatch: ['**/?(*.)+(spec|test).ts', '**/?(*.)+(spec|test).tsx'],
testPathIgnorePatterns: ['/node_modules/'],
moduleFileExtensions: ['js', 'ts', 'tsx', 'json', 'node'],
coveragePathIgnorePatterns: ['node_modules', '.umi'],
collectCoverageFrom: ['src/**/*.{ts,tsx}', '!**/node_modules/**', '!**/vendor/**'],
globals: {
'ts-jest': {
diagnostics: false,
},
},
};
export default config;