defaults.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. var _os;
  6. function _load_os() {
  7. return _os = _interopRequireDefault(require('os'));
  8. }
  9. var _path;
  10. function _load_path() {
  11. return _path = _interopRequireDefault(require('path'));
  12. }
  13. var _jestRegexUtil;
  14. function _load_jestRegexUtil() {
  15. return _jestRegexUtil = require('jest-regex-util');
  16. }
  17. var _constants;
  18. function _load_constants() {
  19. return _constants = require('./constants');
  20. }
  21. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  22. const NODE_MODULES_REGEXP = (0, (_jestRegexUtil || _load_jestRegexUtil()).replacePathSepForRegex)((_constants || _load_constants()).NODE_MODULES); /**
  23. * Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
  24. *
  25. * This source code is licensed under the MIT license found in the
  26. * LICENSE file in the root directory of this source tree.
  27. *
  28. *
  29. */
  30. const cacheDirectory = (() => {
  31. var _process = process;
  32. const getuid = _process.getuid;
  33. if (getuid == null) {
  34. return (_path || _load_path()).default.join((_os || _load_os()).default.tmpdir(), 'jest');
  35. }
  36. // On some platforms tmpdir() is `/tmp`, causing conflicts between different
  37. // users and permission issues. Adding an additional subdivision by UID can
  38. // help.
  39. return (_path || _load_path()).default.join((_os || _load_os()).default.tmpdir(), 'jest_' + getuid.call(process).toString(36));
  40. })();
  41. exports.default = {
  42. automock: false,
  43. bail: false,
  44. browser: false,
  45. cache: true,
  46. cacheDirectory,
  47. changedFilesWithAncestor: false,
  48. clearMocks: false,
  49. coveragePathIgnorePatterns: [NODE_MODULES_REGEXP],
  50. coverageReporters: ['json', 'text', 'lcov', 'clover'],
  51. detectLeaks: false,
  52. expand: false,
  53. forceCoverageMatch: [],
  54. globalSetup: null,
  55. globalTeardown: null,
  56. globals: {},
  57. haste: {
  58. providesModuleNodeModules: []
  59. },
  60. moduleDirectories: ['node_modules'],
  61. moduleFileExtensions: ['js', 'json', 'jsx', 'node'],
  62. moduleNameMapper: {},
  63. modulePathIgnorePatterns: [],
  64. noStackTrace: false,
  65. notify: false,
  66. notifyMode: 'always',
  67. preset: null,
  68. resetMocks: false,
  69. resetModules: false,
  70. restoreMocks: false,
  71. runTestsByPath: false,
  72. runner: 'jest-runner',
  73. snapshotSerializers: [],
  74. testEnvironment: 'jest-environment-jsdom',
  75. testEnvironmentOptions: {},
  76. testFailureExitCode: 1,
  77. testLocationInResults: false,
  78. testMatch: ['**/__tests__/**/*.js?(x)', '**/?(*.)(spec|test).js?(x)'],
  79. testPathIgnorePatterns: [NODE_MODULES_REGEXP],
  80. testRegex: '',
  81. testResultsProcessor: null,
  82. testURL: 'about:blank',
  83. timers: 'real',
  84. transformIgnorePatterns: [NODE_MODULES_REGEXP],
  85. useStderr: false,
  86. verbose: null,
  87. watch: false,
  88. watchPathIgnorePatterns: [],
  89. watchman: true
  90. };