forked from mattermost/mattermost-redux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
46 lines (45 loc) · 1.29 KB
/
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
module.exports = {
globals: {
'ts-jest': {
tsConfig: 'tsconfig.json',
diagnostics: true,
},
NODE_ENV: 'test',
},
preset: 'ts-jest/presets/js-with-babel',
rootDir: '.',
moduleDirectories: ['node_modules', 'src'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
transformIgnorePatterns: ['<rootDir>/node_modules/'],
testMatch: [
'<rootDir>/src/**/?(*.)(spec|test).(ts|js)?(x)',
],
setupFilesAfterEnv: [
'<rootDir>/test/setup.js',
],
clearMocks: true,
collectCoverageFrom: [
'src/**/*.{js}',
'src/**/*.{ts}',
],
coverageReporters: [
'lcov',
'text-summary',
],
reporters: [
'default',
'jest-junit',
],
verbose: true,
moduleNameMapper: {
'^src/(.*)$': '<rootDir>/src/$1',
'^test/(.*)$': '<rootDir>/test/$1',
'^utils/(.*)$': '<rootDir>/src/utils/$1',
'^actions/(.*)$': '<rootDir>/src/actions/$1',
'^action_types$': '<rootDir>/src/action_types',
'^constants$': '<rootDir>/src/constants',
'^action_types/(.*)$': '<rootDir>/src/action_types/$1',
},
};