-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathjest.config.js
More file actions
31 lines (29 loc) · 999 Bytes
/
jest.config.js
File metadata and controls
31 lines (29 loc) · 999 Bytes
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
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/
process.env.TZ = 'UTC';
module.exports = {
rootDir: '../',
setupFiles: ['<rootDir>/test/setupTests.ts'],
setupFilesAfterEnv: ['<rootDir>/test/setup.jest.ts'],
roots: ['<rootDir>'],
testMatch: ['**/*.test.js', '**/*.test.jsx', '**/*.test.ts', '**/*.test.tsx'],
clearMocks: true,
modulePathIgnorePatterns: ['<rootDir>/offline-module-cache/'],
testPathIgnorePatterns: ['<rootDir>/build/', '<rootDir>/node_modules/', '/__utils__/'],
snapshotSerializers: ['enzyme-to-json/serializer'],
coveragePathIgnorePatterns: [
'<rootDir>/build/',
'<rootDir>/node_modules/',
'<rootDir>/test/',
'<rootDir>/public/requests/',
'/__utils__/',
],
moduleNameMapper: {
'\\.(css|less|sass|scss)$': '<rootDir>/test/__mocks__/styleMock.js',
'\\.(gif|ttf|eot|svg|png)$': '<rootDir>/test/__mocks__/fileMock.js',
'^!!raw-loader!.*': 'jest-raw-loader',
},
testEnvironment: 'jsdom',
};