Fix name convention issue
[sdc/sdc-workflow-designer.git] / sdc-workflow-designer-ui / src / main / frontend / jest.config.js
1 /*
2 * Copyright © 2018 European Support Limited
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10  * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 module.exports = {
18     collectCoverageFrom: ['src/**/*.{js,jsx,mjs}'],
19     setupFiles: ['jest-localstorage-mock'],
20     testMatch: [
21         '<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}',
22         '<rootDir>/src/**/?(*.)(spec|test).{js,jsx,mjs}'
23     ],
24     testEnvironment: 'node',
25     testURL: 'http://localhost',
26     globals: {
27         DEBUG: false
28     },
29     transformIgnorePatterns: ['[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs)$'],
30     moduleNameMapper: {
31         '\\.(css|scss)$': 'identity-obj-proxy',
32         '\\.(gif|ttf|eot|svg)$': '<rootDir>/__mocks__/fileMock.js',
33         '^src(.*)$': '<rootDir>/src$1',
34         '^config(.*)$': '<rootDir>/src/config$1',
35         '^features(.*)$': '<rootDir>/src/features$1',
36         '^wfapp(.*)$': '<rootDir>/src$1',
37         '^common(.*)$': '<rootDir>/common$1',
38         '^services(.*)$': '<rootDir>/src/services$1',
39         '^shared(.*)$': '<rootDir>/src/shared$1',
40         '^i18n(.*)$': '<rootDir>/src/i18n$1'
41     },
42     transform: {
43         '^.+\\.(js|jsx|mjs)$': '<rootDir>/node_modules/babel-jest',
44         '^(?!.*\\.(js|jsx|mjs|css|json)$)':
45             '<rootDir>/testSetup/fileTransform.js'
46     },
47     roots: ['<rootDir>/src/features', '<rootDir>/src/shared']
48 };