You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

194 lines
6.6 KiB

  1. // For a detailed explanation regarding each configuration property, visit:
  2. // https://jestjs.io/docs/en/configuration.html
  3. module.exports = {
  4. // All imported modules in your tests should be mocked automatically
  5. // automock: false,
  6. // Stop running tests after `n` failures
  7. // bail: 0,
  8. // The directory where Jest should store its cached dependency information
  9. // cacheDirectory: "C:\\Users\\danil\\AppData\\Local\\Temp\\jest",
  10. // Automatically clear mock calls and instances between every test
  11. clearMocks: true,
  12. // Indicates whether the coverage information should be collected while executing the test
  13. collectCoverage: true,
  14. // An array of glob patterns indicating a set of files for which coverage information should be collected
  15. collectCoverageFrom: [
  16. '<rootDir>/src/services/**/*.ts',
  17. ],
  18. // The directory where Jest should output its coverage files
  19. coverageDirectory: 'coverage',
  20. // An array of regexp pattern strings used to skip coverage collection
  21. // coveragePathIgnorePatterns: [
  22. // "\\\\node_modules\\\\"
  23. // ],
  24. // Indicates which provider should be used to instrument code for coverage
  25. // coverageProvider: "babel",
  26. // A list of reporter names that Jest uses when writing coverage reports
  27. coverageReporters: [
  28. "text-summary",
  29. "lcov",
  30. ],
  31. // An object that configures minimum threshold enforcement for coverage results
  32. // coverageThreshold: undefined,
  33. // A path to a custom dependency extractor
  34. // dependencyExtractor: undefined,
  35. // Make calling deprecated APIs throw helpful error messages
  36. // errorOnDeprecated: false,
  37. // Force coverage collection from ignored files using an array of glob patterns
  38. // forceCoverageMatch: [],
  39. // A path to a module which exports an async function that is triggered once before all test suites
  40. // globalSetup: undefined,
  41. // A path to a module which exports an async function that is triggered once after all test suites
  42. // globalTeardown: undefined,
  43. // A set of global variables that need to be available in all test environments
  44. // globals: {},
  45. // The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
  46. // maxWorkers: "50%",
  47. // An array of directory names to be searched recursively up from the requiring module's location
  48. // moduleDirectories: [
  49. // "node_modules"
  50. // ],
  51. // An array of file extensions your modules use
  52. // moduleFileExtensions: [
  53. // "js",
  54. // "json",
  55. // "jsx",
  56. // "ts",
  57. // "tsx",
  58. // "node"
  59. // ],
  60. // A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
  61. //moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {prefix: '<rootDir>/src/'}),
  62. // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
  63. // modulePathIgnorePatterns: [],
  64. // Activates notifications for test results
  65. // notify: false,
  66. // An enum that specifies notification mode. Requires { notify: true }
  67. // notifyMode: "failure-change",
  68. // A preset that is used as a base for Jest's configuration
  69. preset: 'ts-jest',
  70. // Run tests from one or more projects
  71. // projects: undefined,
  72. // Use this configuration option to add custom reporters to Jest
  73. // reporters: undefined,
  74. // Automatically reset mock state between every test
  75. // resetMocks: false,
  76. // Reset the module registry before running each individual test
  77. // resetModules: false,
  78. // A path to a custom resolver
  79. // resolver: undefined,
  80. // Automatically restore mock state between every test
  81. // restoreMocks: false,
  82. // The root directory that Jest should scan for tests and modules within
  83. // rootDir: './src',
  84. // A list of paths to directories that Jest should use to search for files in
  85. // roots: [
  86. // "<rootDir>"
  87. // ],
  88. // Allows you to use a custom runner instead of Jest's default test runner
  89. // runner: "jest-runner",
  90. // The paths to modules that run some code to configure or set up the testing environment before each test
  91. // setupFiles: [],
  92. // A list of paths to modules that run some code to configure or set up the testing framework before each test
  93. setupFilesAfterEnv: [
  94. "./jest.setup.ts"
  95. ],
  96. // The number of seconds after which a test is considered as slow and reported as such in the results.
  97. // slowTestThreshold: 5,
  98. // A list of paths to snapshot serializer modules Jest should use for snapshot testing
  99. // snapshotSerializers: [],
  100. // The test environment that will be used for testing
  101. testEnvironment: "node",
  102. // Options that will be passed to the testEnvironment
  103. // testEnvironmentOptions: {},
  104. // Adds a location field to test results
  105. // testLocationInResults: false,
  106. // The glob patterns Jest uses to detect test files
  107. testMatch: [
  108. "**/*.spec.ts",
  109. ],
  110. // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
  111. // testPathIgnorePatterns: [
  112. // "\\\\node_modules\\\\"
  113. // ],
  114. // The regexp pattern or array of patterns that Jest uses to detect test files
  115. // testRegex: [],
  116. // This option allows the use of a custom results processor
  117. // testResultsProcessor: undefined,
  118. // This option allows use of a custom test runner
  119. // testRunner: "jasmine2",
  120. // This option sets the URL for the jsdom environment. It is reflected in properties such as location.href
  121. // testURL: "http://localhost",
  122. // Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout"
  123. // timers: "real",
  124. // A map from regular expressions to paths to transformers
  125. // transform: undefined,
  126. // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
  127. // transformIgnorePatterns: [
  128. // "\\\\node_modules\\\\",
  129. // "\\.pnp\\.[^\\\\]+$"
  130. // ],
  131. // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
  132. // unmockedModulePathPatterns: undefined,
  133. // Indicates whether each individual test should be reported during the run
  134. // verbose: undefined,
  135. // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
  136. // watchPathIgnorePatterns: [],
  137. // Whether to use watchman for file crawling
  138. // watchman: true,
  139. };