-
Notifications
You must be signed in to change notification settings - Fork 202
Expand file tree
/
Copy pathjest.config.js
More file actions
22 lines (21 loc) · 907 Bytes
/
jest.config.js
File metadata and controls
22 lines (21 loc) · 907 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
process.env.IS_JEST = true;
module.exports = {
moduleNameMapper: {
'\\.(gif|ico|png|md|txt)$': '<rootDir>/test-helpers/mocks/fileMock.js',
'\\.svg$': '<rootDir>/test-helpers/mocks/svgMock.js',
'\\.(css|scss)$': 'identity-obj-proxy',
'!!file-loader.+': '<rootDir>/test-helpers/mocks/fileMock.js',
'^@jetbrains/ring-ui(.*)$': '<rootDir>$1',
'^ws$': '<rootDir>/node_modules/ws/index.js',
// It's needed to fix `ReferenceError: MessageChannel is not defined`
// https://stackoverflow.com/questions/79506842/react-19-jest-let-test-cases-failed-with-error-referenceerror-messagechannel
'react-dom/server': 'react-dom/server.edge',
},
setupFiles: ['<rootDir>/test-helpers/jest-setup.js', '<rootDir>/test-helpers/jest-globals.js'],
transform: {
'^.+\\.[jt]sx?$': 'babel-jest',
},
transformIgnorePatterns: [],
restoreMocks: true,
testEnvironment: 'jsdom',
};