ValidConfig.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. 'use strict';
  2. Object.defineProperty(exports, '__esModule', {
  3. value: true
  4. });
  5. var _jestRegexUtil;
  6. function _load_jestRegexUtil() {
  7. return (_jestRegexUtil = require('jest-regex-util'));
  8. }
  9. var _constants;
  10. function _load_constants() {
  11. return (_constants = require('./constants'));
  12. }
  13. const NODE_MODULES_REGEXP = (0,
  14. (_jestRegexUtil || _load_jestRegexUtil()).replacePathSepForRegex)(
  15. (_constants || _load_constants()).NODE_MODULES
  16. );
  17. /**
  18. * Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
  19. *
  20. * This source code is licensed under the MIT license found in the
  21. * LICENSE file in the root directory of this source tree.
  22. *
  23. *
  24. */
  25. exports.default = {
  26. automock: false,
  27. bail: false,
  28. browser: false,
  29. cache: true,
  30. cacheDirectory: '/tmp/user/jest',
  31. changedFilesWithAncestor: false,
  32. changedSince: 'master',
  33. clearMocks: false,
  34. collectCoverage: true,
  35. collectCoverageFrom: ['src', '!public'],
  36. collectCoverageOnlyFrom: {
  37. '<rootDir>/this-directory-is-covered/Covered.js': true
  38. },
  39. coverageDirectory: 'coverage',
  40. coveragePathIgnorePatterns: [NODE_MODULES_REGEXP],
  41. coverageReporters: ['json', 'text', 'lcov', 'clover'],
  42. coverageThreshold: {
  43. global: {
  44. branches: 50,
  45. functions: 100,
  46. lines: 100,
  47. statements: 100
  48. }
  49. },
  50. displayName: 'project-name',
  51. errorOnDeprecated: false,
  52. expand: false,
  53. filter: '<rootDir>/filter.js',
  54. forceCoverageMatch: ['**/*.t.js'],
  55. forceExit: false,
  56. globalSetup: 'setup.js',
  57. globalTeardown: 'teardown.js',
  58. globals: {__DEV__: true},
  59. haste: {
  60. defaultPlatform: 'ios',
  61. hasteImplModulePath: '<rootDir>/haste_impl.js',
  62. platforms: ['ios', 'android'],
  63. providesModuleNodeModules: ['react', 'react-native']
  64. },
  65. json: false,
  66. lastCommit: false,
  67. logHeapUsage: true,
  68. moduleDirectories: ['node_modules'],
  69. moduleFileExtensions: ['js', 'json', 'jsx', 'node'],
  70. moduleLoader: '<rootDir>',
  71. moduleNameMapper: {
  72. '^React$': '<rootDir>/node_modules/react'
  73. },
  74. modulePathIgnorePatterns: ['<rootDir>/build/'],
  75. modulePaths: ['/shared/vendor/modules'],
  76. name: 'string',
  77. noStackTrace: false,
  78. notify: false,
  79. notifyMode: 'always',
  80. onlyChanged: false,
  81. preset: 'react-native',
  82. prettierPath: '<rootDir>/node_modules/prettier',
  83. projects: ['project-a', 'project-b/'],
  84. reporters: [
  85. 'default',
  86. 'custom-reporter-1',
  87. ['custom-reporter-2', {configValue: true}]
  88. ],
  89. resetMocks: false,
  90. resetModules: false,
  91. resolver: '<rootDir>/resolver.js',
  92. restoreMocks: false,
  93. rootDir: '/',
  94. roots: ['<rootDir>'],
  95. runTestsByPath: false,
  96. runner: 'jest-runner',
  97. setupFiles: ['<rootDir>/setup.js'],
  98. setupTestFrameworkScriptFile: '<rootDir>/testSetupFile.js',
  99. silent: true,
  100. skipFilter: false,
  101. skipNodeResolution: false,
  102. snapshotSerializers: ['my-serializer-module'],
  103. testEnvironment: 'jest-environment-jsdom',
  104. testEnvironmentOptions: {userAgent: 'Agent/007'},
  105. testFailureExitCode: 1,
  106. testLocationInResults: false,
  107. testMatch: ['**/__tests__/**/*.js?(x)', '**/?(*.)+(spec|test).js?(x)'],
  108. testNamePattern: 'test signature',
  109. testPathIgnorePatterns: [NODE_MODULES_REGEXP],
  110. testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.jsx?$',
  111. testResultsProcessor: 'processor-node-module',
  112. testRunner: 'jasmine2',
  113. testURL: 'http://localhost',
  114. timers: 'real',
  115. transform: {
  116. '^.+\\.js$': '<rootDir>/preprocessor.js'
  117. },
  118. transformIgnorePatterns: [NODE_MODULES_REGEXP],
  119. unmockedModulePathPatterns: ['mock'],
  120. updateSnapshot: true,
  121. useStderr: false,
  122. verbose: false,
  123. watch: false,
  124. watchPathIgnorePatterns: ['<rootDir>/e2e/'],
  125. watchPlugins: [
  126. 'path/to/yourWatchPlugin',
  127. [
  128. 'jest-watch-typeahead/filename',
  129. {
  130. key: 'k',
  131. prompt: 'do something with my custom prompt'
  132. }
  133. ]
  134. ],
  135. watchman: true
  136. };