-
Notifications
You must be signed in to change notification settings - Fork 14
/
jest.config.js
48 lines (45 loc) · 1.34 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
47
48
/*
* Copyright (C) 2020 Graylog, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the Server Side Public License, version 1,
* as published by MongoDB, Inc.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* Server Side Public License for more details.
*
* You should have received a copy of the Server Side Public License
* along with this program. If not, see
* <http://www.mongodb.com/licensing/server-side-public-license>.
*/
const buildConfig = require('./build.config');
const webSrcPrefix = buildConfig.web_src_path;
const jestConfig = {
preset: 'jest-preset-graylog',
setupFiles: [],
setupFilesAfterEnv: [
'jest-enzyme',
],
moduleDirectories: [
'src',
'test',
'node_modules',
`${webSrcPrefix}/src`,
`${webSrcPrefix}/test`,
],
moduleNameMapper: {
'^aws/(.+)$': 'web/aws/$1',
'^react$': `${webSrcPrefix}/node_modules/react/index.js`,
'^react-dom$': `${webSrcPrefix}/node_modules/react-dom/index.js`,
'^styled-components$': `${webSrcPrefix}/node_modules/styled-components`,
},
roots: [
'src',
],
transform: {
'^.+\\.[tj]sx?$': 'babel-jest',
},
};
module.exports = jestConfig;