|
| 1 | +// For a detailed explanation regarding each configuration property, visit: |
| 2 | +// https://jestjs.io/docs/en/configuration.html |
| 3 | + |
| 4 | +module.exports = { |
| 5 | + // Automatically clear mock calls and instances between every test |
| 6 | + clearMocks: true, |
| 7 | + |
| 8 | + // An array of glob patterns indicating a set of files for which coverage information should be collected |
| 9 | + collectCoverageFrom: [ |
| 10 | + 'src/containers/**/*.{js,jsx}', |
| 11 | + 'src/components/**/*.{js,jsx}' |
| 12 | + ], |
| 13 | + |
| 14 | + // The directory where Jest should output its coverage files |
| 15 | + coverageDirectory: 'coverage', |
| 16 | + |
| 17 | + coverageThreshold: { |
| 18 | + global: { |
| 19 | + branches: 70, |
| 20 | + functions: 70, |
| 21 | + lines: 70, |
| 22 | + statements: 70 |
| 23 | + } |
| 24 | + }, |
| 25 | + |
| 26 | + // An array of file extensions your modules use |
| 27 | + moduleFileExtensions: ['js', 'json', 'jsx'], |
| 28 | + |
| 29 | + moduleNameMapper: { |
| 30 | + '\\.(css|scss|sass)$': '<rootDir>/config/CSSStub.js' |
| 31 | + }, |
| 32 | + |
| 33 | + // The paths to modules that run some code to configure or set up the testing environment before each test |
| 34 | + setupFiles: ['<rootDir>/config/enzyme.config.js'], |
| 35 | + |
| 36 | + // The test environment that will be used for testing |
| 37 | + testEnvironment: 'jsdom', |
| 38 | + |
| 39 | + // The glob patterns Jest uses to detect test files |
| 40 | + testMatch: ['**/__tests__/**/*.js?(x)', '**/?(*.)+(spec|test).js?(x)'], |
| 41 | + |
| 42 | + // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped |
| 43 | + testPathIgnorePatterns: ['\\\\node_modules\\\\'], |
| 44 | + |
| 45 | + // This option sets the URL for the jsdom environment. It is reflected in properties such as location.href |
| 46 | + testURL: 'http://localhost', |
| 47 | + |
| 48 | + // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation |
| 49 | + transformIgnorePatterns: ['<rootDir>/node_modules/'], |
| 50 | + |
| 51 | + // Indicates whether each individual test should be reported during the run |
| 52 | + verbose: false |
| 53 | +}; |
0 commit comments