Repository navigation
Expand file tree
/
Copy pathjest.config.js
More file actions
32 lines (32 loc) · 1.51 KB
/
Copy pathjest.config.js
File metadata and controls
32 lines (32 loc) · 1.51 KB
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
32
module.exports = {
clearMocks: true,
collectCoverage: false,
collectCoverageFrom: ['**/*.{ts,tsx}', '!**/*.d.ts', '!**/messages.{ts,tsx}', '!**/node_modules/**'],
coverageDirectory: '<rootDir>/reports',
globals: {
__NAME__: 'name',
__VERSION__: 'version',
__LANGUAGE__: 'en-US',
},
moduleNameMapper: {
'\\.(css|scss|less|html)$': '<rootDir>/scripts/jest/styleMock.js',
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2)$': '<rootDir>/scripts/jest/fileMock.js',
'@popperjs/core': '<rootDir>/scripts/jest/popperMock.js',
'box-annotations-locale-data': '<rootDir>/scripts/jest/i18nMock.js',
'box-elements-messages': '<rootDir>/scripts/jest/i18nMock.js',
'react-intl': '<rootDir>/scripts/jest/react-intl-mock.js',
'react-intl-locale-data': '<rootDir>/node_modules/react-intl/locale-data/en.js',
mousetrap: '<rootDir>/scripts/jest/moduleMock.js',
rangy: '<rootDir>/scripts/jest/moduleMock.js',
},
modulePathIgnorePatterns: ['__mocks__'],
restoreMocks: true,
roots: ['src'],
setupFiles: ['jest-canvas-mock', '<rootDir>/scripts/jest/envWindow.js'],
setupFilesAfterEnv: ['<rootDir>/scripts/jest/enzyme-adapter.js', '<rootDir>/scripts/jest/jest-setup.ts'],
snapshotSerializers: ['enzyme-to-json/serializer'],
testEnvironment: 'jsdom',
transformIgnorePatterns: [
'node_modules/(?!(box-ui-elements|uuid|@box/blueprint-web|@box/blueprint-web-assets|@tanstack|@ariakit)/)',
],
};