jest.config.js 1.3 KB

123456789101112131415161718192021222324252627282930
  1. // For a detailed explanation regarding each configuration property, visit:
  2. // https://jestjs.io/docs/en/configuration.html
  3. module.exports = {
  4. // The directory where Jest should store its cached dependency information
  5. cacheDirectory: ".jest-cache",
  6. // Automatically clear mock calls and instances between every test
  7. clearMocks: true,
  8. // The directory where Jest should output its coverage files
  9. coverageDirectory: ".coverage",
  10. // An array of regexp pattern strings used to skip coverage collection
  11. coveragePathIgnorePatterns: ["/node_modules/", "<rootDir>/packages/(?:.+?)/dist/"],
  12. // An array of directory names to be searched recursively up from the requiring module's location
  13. moduleDirectories: ["node_modules", "packages"],
  14. // An array of file extensions your modules use
  15. moduleFileExtensions: ["js", "json", "jsx", "ts", "tsx", "node"],
  16. // Run tests from one or more projects
  17. projects: ["<rootDir>", "<rootDir>/packages/*"],
  18. // A list of paths to modules that run some code to configure or set up the testing framework before each test
  19. setupFilesAfterEnv: ["<rootDir>/setupTests.js"],
  20. // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
  21. testPathIgnorePatterns: ["/node_modules/", "<rootDir>/packages/(?:.+?)/dist/"],
  22. };