-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathjest.config.js
More file actions
31 lines (30 loc) · 968 Bytes
/
jest.config.js
File metadata and controls
31 lines (30 loc) · 968 Bytes
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
/* eslint-disable no-undef */
module.exports = {
// Automatically clear mock calls and instances between every test
preset: 'ts-jest',
testEnvironment: 'node',
coverageDirectory: 'coverage',
clearMocks: true,
verbose: true,
transform: {
'^.+\\.[tj]s$': 'ts-jest'
},
modulePathIgnorePatterns: ['dist'],
transformIgnorePatterns: ['<rootDir>/node_modules/(?!@foo)'],
testPathIgnorePatterns: ['/test', '/commands', '/errors', '/listeners'],
moduleFileExtensions: ['ts', 'js', 'json', 'node'],
moduleDirectories: ['node_modules'],
//
moduleNameMapper: {
'^core/(.*?)$': '<rootDir>/core/$1',
'^utils/(.*?)$': '<rootDir>/utils/$1',
'^utils': '<rootDir>/utils',
'@actions': '<rootDir>/core/store/actions.ts',
'^@hooks/(.*?)$': '<rootDir>/hooks/$1',
'@hooks': '<rootDir>/hooks',
'^constants/(.*?)$': '<rootDir>/constants/$1',
'^models/(.*?)$': '<rootDir>/models/$1',
errors: '<rootDir>/errors'
}
//
};