-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
/
questions.ts
43 lines (39 loc) · 1.06 KB
/
questions.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import type {PromptObject} from 'prompts';
const defaultQuestions: Array<PromptObject> = [
{
choices: [
{title: 'node', value: 'node'},
{title: 'jsdom (browser-like)', value: 'jsdom'},
],
initial: 0,
message: 'Choose the test environment that will be used for testing',
name: 'environment',
type: 'select',
},
{
initial: false,
message: 'Do you want Jest to add coverage reports?',
name: 'coverage',
type: 'confirm',
},
{
initial: false,
message: 'Automatically clear mock calls and instances between every test?',
name: 'clearMocks',
type: 'confirm',
},
];
export default defaultQuestions;
export const testScriptQuestion: PromptObject = {
initial: true,
message:
'Would you like to use Jest when running "test" script in "package.json"?',
name: 'scripts',
type: 'confirm',
};