File tree Expand file tree Collapse file tree 2 files changed +34
-11
lines changed Expand file tree Collapse file tree 2 files changed +34
-11
lines changed Original file line number Diff line number Diff line change @@ -49,10 +49,6 @@ const params = program
49
49
'--useOptions [value]' ,
50
50
'DEPRECATED. Use options instead of arguments?' ,
51
51
)
52
- . option (
53
- '--interactive [value]' ,
54
- 'Show an interactive error reporting tool when the program crashes? (default: false)' ,
55
- )
56
52
. parse ( process . argv )
57
53
. opts ( ) ;
58
54
@@ -95,15 +91,8 @@ async function start() {
95
91
'experimentalParser' ,
96
92
'exportCore' ,
97
93
'useOptions' ,
98
- 'interactive' ,
99
94
] ) ;
100
95
101
- // Only set interactive automatically if not explicitly configured by user
102
- // Default should be false according to documentation
103
- if ( userConfig . interactive === undefined ) {
104
- userConfig . interactive = false ; // Default to false as per documentation
105
- }
106
-
107
96
if ( params . plugins === true ) {
108
97
userConfig . plugins = [ ] ;
109
98
} else if ( params . plugins ) {
Original file line number Diff line number Diff line change
1
+ import { describe , expect , it } from 'vitest' ;
2
+
3
+ import { initConfigs } from '../config/init' ;
4
+
5
+ describe ( 'interactive config' , ( ) => {
6
+ it ( 'should default to false when not provided' , async ( ) => {
7
+ const result = await initConfigs ( {
8
+ input : 'test.json' ,
9
+ output : './test' ,
10
+ } ) ;
11
+
12
+ expect ( result . results [ 0 ] . config . interactive ) . toBe ( false ) ;
13
+ } ) ;
14
+
15
+ it ( 'should respect user config when set to true' , async ( ) => {
16
+ const result = await initConfigs ( {
17
+ input : 'test.json' ,
18
+ interactive : true ,
19
+ output : './test' ,
20
+ } ) ;
21
+
22
+ expect ( result . results [ 0 ] . config . interactive ) . toBe ( true ) ;
23
+ } ) ;
24
+
25
+ it ( 'should respect user config when set to false' , async ( ) => {
26
+ const result = await initConfigs ( {
27
+ input : 'test.json' ,
28
+ interactive : false ,
29
+ output : './test' ,
30
+ } ) ;
31
+
32
+ expect ( result . results [ 0 ] . config . interactive ) . toBe ( false ) ;
33
+ } ) ;
34
+ } ) ;
You can’t perform that action at this time.
0 commit comments