-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.js
33 lines (32 loc) · 889 Bytes
/
jest.config.js
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
33
// For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html
module.exports = {
testEnvironment: 'jest-environment-jsdom',
globals: {
NODE_ENV: 'test',
},
globalSetup: './tests/global-setup.js',
setupFilesAfterEnv: ['./tests/setup.js'],
moduleDirectories: [
'node_modules',
'imports',
],
// Automatically clear mock calls and instances between every test
clearMocks: true,
coverageDirectory: './coverage',
// A list of reporter names that Jest uses when writing coverage reports
coverageReporters: ['text-summary', 'html'],
transform: {
'\\.js$': 'babel-jest',
},
transformIgnorePatterns: [
'/node_modules/',
'\\.pnp\\.[^\\/]+$',
],
moduleNameMapper: {
'\\.(?:gif|png|jpe?g|svg|woff2?|css)$': '<rootDir>/tests/stubs/staticFile.js',
},
modulePathIgnorePatterns: [
'<rootDir>/build/',
],
};