index.js 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. 'use strict';
  2. var _mkdirp;
  3. function _load_mkdirp() {
  4. return (_mkdirp = _interopRequireDefault(require('mkdirp')));
  5. }
  6. var _buffered_console;
  7. function _load_buffered_console() {
  8. return (_buffered_console = _interopRequireDefault(
  9. require('./buffered_console')
  10. ));
  11. }
  12. var _clear_line;
  13. function _load_clear_line() {
  14. return (_clear_line = _interopRequireDefault(require('./clear_line')));
  15. }
  16. var _Console;
  17. function _load_Console() {
  18. return (_Console = _interopRequireDefault(require('./Console')));
  19. }
  20. var _fake_timers;
  21. function _load_fake_timers() {
  22. return (_fake_timers = _interopRequireDefault(require('./fake_timers')));
  23. }
  24. var _format_test_results;
  25. function _load_format_test_results() {
  26. return (_format_test_results = _interopRequireDefault(
  27. require('./format_test_results')
  28. ));
  29. }
  30. var _get_failed_snapshot_tests;
  31. function _load_get_failed_snapshot_tests() {
  32. return (_get_failed_snapshot_tests = _interopRequireDefault(
  33. require('./get_failed_snapshot_tests')
  34. ));
  35. }
  36. var _get_console_output;
  37. function _load_get_console_output() {
  38. return (_get_console_output = _interopRequireDefault(
  39. require('./get_console_output')
  40. ));
  41. }
  42. var _install_common_globals;
  43. function _load_install_common_globals() {
  44. return (_install_common_globals = _interopRequireDefault(
  45. require('./install_common_globals')
  46. ));
  47. }
  48. var _null_console;
  49. function _load_null_console() {
  50. return (_null_console = _interopRequireDefault(require('./null_console')));
  51. }
  52. var _is_interative;
  53. function _load_is_interative() {
  54. return (_is_interative = _interopRequireDefault(require('./is_interative')));
  55. }
  56. var _get_callsite;
  57. function _load_get_callsite() {
  58. return (_get_callsite = _interopRequireDefault(require('./get_callsite')));
  59. }
  60. var _set_global;
  61. function _load_set_global() {
  62. return (_set_global = _interopRequireDefault(require('./set_global')));
  63. }
  64. var _deep_cyclic_copy;
  65. function _load_deep_cyclic_copy() {
  66. return (_deep_cyclic_copy = _interopRequireDefault(
  67. require('./deep_cyclic_copy')
  68. ));
  69. }
  70. var _convert_descriptor_to_string;
  71. function _load_convert_descriptor_to_string() {
  72. return (_convert_descriptor_to_string = _interopRequireDefault(
  73. require('./convert_descriptor_to_string')
  74. ));
  75. }
  76. function _interopRequireDefault(obj) {
  77. return obj && obj.__esModule ? obj : {default: obj};
  78. }
  79. const createDirectory = path => {
  80. try {
  81. (_mkdirp || _load_mkdirp()).default.sync(path, '777');
  82. } catch (e) {
  83. if (e.code !== 'EEXIST') {
  84. throw e;
  85. }
  86. }
  87. };
  88. /**
  89. * Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
  90. *
  91. * This source code is licensed under the MIT license found in the
  92. * LICENSE file in the root directory of this source tree.
  93. *
  94. *
  95. */
  96. module.exports = {
  97. BufferedConsole: (_buffered_console || _load_buffered_console()).default,
  98. Console: (_Console || _load_Console()).default,
  99. FakeTimers: (_fake_timers || _load_fake_timers()).default,
  100. NullConsole: (_null_console || _load_null_console()).default,
  101. clearLine: (_clear_line || _load_clear_line()).default,
  102. convertDescriptorToString: (
  103. _convert_descriptor_to_string || _load_convert_descriptor_to_string()
  104. ).default,
  105. createDirectory: createDirectory,
  106. deepCyclicCopy: (_deep_cyclic_copy || _load_deep_cyclic_copy()).default,
  107. formatTestResults: (_format_test_results || _load_format_test_results())
  108. .default,
  109. getCallsite: (_get_callsite || _load_get_callsite()).default,
  110. getConsoleOutput: (_get_console_output || _load_get_console_output()).default,
  111. getFailedSnapshotTests: (
  112. _get_failed_snapshot_tests || _load_get_failed_snapshot_tests()
  113. ).default,
  114. installCommonGlobals: (
  115. _install_common_globals || _load_install_common_globals()
  116. ).default,
  117. isInteractive: (_is_interative || _load_is_interative()).default,
  118. setGlobal: (_set_global || _load_set_global()).default
  119. };