Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
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.

jest.config.cjs 6.7KB

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