|
| 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: ["src/**/*.{js,jsx,mjs}"], |
| 10 | + |
| 11 | + // The directory where Jest should output its coverage files |
| 12 | + coverageDirectory: "coverage", |
| 13 | + |
| 14 | + // An array of file extensions your modules use |
| 15 | + moduleFileExtensions: ["js", "json", "jsx"], |
| 16 | + |
| 17 | + // The paths to modules that run some code to configure or set up the testing environment before each test |
| 18 | + setupFiles: ["<rootDir>/enzyme.config.js"], |
| 19 | + |
| 20 | + // The test environment that will be used for testing |
| 21 | + testEnvironment: "jsdom", |
| 22 | + |
| 23 | + // The glob patterns Jest uses to detect test files |
| 24 | + testMatch: ["**/__tests__/**/*.js?(x)", "**/?(*.)+(spec|test).js?(x)"], |
| 25 | + |
| 26 | + // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped |
| 27 | + testPathIgnorePatterns: ["\\\\node_modules\\\\"], |
| 28 | + |
| 29 | + // This option sets the URL for the jsdom environment. It is reflected in properties such as location.href |
| 30 | + testURL: "http://localhost", |
| 31 | + |
| 32 | + // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation |
| 33 | + transformIgnorePatterns: ["<rootDir>/node_modules/"], |
| 34 | + |
| 35 | + // Indicates whether each individual test should be reported during the run |
| 36 | + verbose: false |
| 37 | +}; |
0 commit comments