/* * Copyright © 2018 European Support Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ module.exports = { collectCoverageFrom: ['src/**/*.{js,jsx,mjs}'], setupFiles: ['jest-localstorage-mock'], testMatch: [ '/src/**/__tests__/**/*.{js,jsx,mjs}', '/src/**/?(*.)(spec|test).{js,jsx,mjs}' ], testEnvironment: 'node', testURL: 'http://localhost', globals: { DEBUG: false }, transformIgnorePatterns: ['[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs)$'], moduleNameMapper: { '\\.(css|scss)$': 'identity-obj-proxy', '\\.(gif|ttf|eot|svg)$': '/__mocks__/fileMock.js', '^src(.*)$': '/src$1', '^config(.*)$': '/src/config$1', '^features(.*)$': '/src/features$1', '^wfapp(.*)$': '/src$1', '^common(.*)$': '/common$1', '^services(.*)$': '/src/services$1', '^shared(.*)$': '/src/shared$1', '^i18n(.*)$': '/src/i18n$1' }, transform: { '^.+\\.(js|jsx|mjs)$': '/node_modules/babel-jest', '^(?!.*\\.(js|jsx|mjs|css|json)$)': '/testSetup/fileTransform.js' }, roots: ['/src/features', '/src/shared'] };