questions.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. 'use strict';
  2. Object.defineProperty(exports, '__esModule', {
  3. value: true
  4. });
  5. exports.testScriptQuestion = exports.default = void 0;
  6. /**
  7. * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
  8. *
  9. * This source code is licensed under the MIT license found in the
  10. * LICENSE file in the root directory of this source tree.
  11. */
  12. const defaultQuestions = [
  13. {
  14. initial: false,
  15. message: 'Would you like to use Typescript for the configuration file?',
  16. name: 'useTypescript',
  17. type: 'confirm'
  18. },
  19. {
  20. choices: [
  21. {
  22. title: 'node',
  23. value: 'node'
  24. },
  25. {
  26. title: 'jsdom (browser-like)',
  27. value: 'jsdom'
  28. }
  29. ],
  30. initial: 0,
  31. message: 'Choose the test environment that will be used for testing',
  32. name: 'environment',
  33. type: 'select'
  34. },
  35. {
  36. initial: false,
  37. message: 'Do you want Jest to add coverage reports?',
  38. name: 'coverage',
  39. type: 'confirm'
  40. },
  41. {
  42. choices: [
  43. {
  44. title: 'v8',
  45. value: 'v8'
  46. },
  47. {
  48. title: 'babel',
  49. value: 'babel'
  50. }
  51. ],
  52. initial: 0,
  53. message: 'Which provider should be used to instrument code for coverage?',
  54. name: 'coverageProvider',
  55. type: 'select'
  56. },
  57. {
  58. initial: false,
  59. message:
  60. 'Automatically clear mock calls, instances and results before every test?',
  61. name: 'clearMocks',
  62. type: 'confirm'
  63. }
  64. ];
  65. var _default = defaultQuestions;
  66. exports.default = _default;
  67. const testScriptQuestion = {
  68. initial: true,
  69. message:
  70. 'Would you like to use Jest when running "test" script in "package.json"?',
  71. name: 'scripts',
  72. type: 'confirm'
  73. };
  74. exports.testScriptQuestion = testScriptQuestion;