blob: 9fcd0abdeb6e6be22a98e8acf46d9e61b7727043 [file] [log] [blame] [edit]
// Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you 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 = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
testMatch: ['<rootDir>/src/tests/**/*.test.tsx'],
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
'^.+\\.(js|jsx)$': 'ts-jest'
},
moduleNameMapper: {
'\\.(css|less|scss|sass)$': '<rootDir>/src/tests/__mocks__/styleMock.js',
'\\.(jpg|jpeg|png|gif|svg)$': '<rootDir>/src/tests/__mocks__/styleMock.js'
},
transformIgnorePatterns: [
'node_modules/(?!(pretty-ms|parse-ms)/)'
],
setupFilesAfterEnv: [
'<rootDir>/src/setupTests.tsx',
'<rootDir>/src/tests/setup-jest.js'
],
// Suppress act() warnings from Material-UI components
testEnvironmentOptions: {
suppressConsole: true
}
};