@@ -53,7 +53,7 @@ suite('QuickFixAddon', () => {
53
53
terminalInstance = {
54
54
async freePortKillProcess ( port : string ) : Promise < void > { }
55
55
} as Pick < ITerminalInstance , 'freePortKillProcess' > ;
56
- quickFixAddon = instantiationService . createInstance ( TerminalQuickFixAddon , capabilities ) ;
56
+ quickFixAddon = instantiationService . createInstance ( TerminalQuickFixAddon , [ ] , capabilities ) ;
57
57
terminal . loadAddon ( quickFixAddon ) ;
58
58
} ) ;
59
59
suite ( 'registerCommandFinishedListener & getMatchActions' , ( ) => {
@@ -79,23 +79,23 @@ suite('QuickFixAddon', () => {
79
79
} ) ;
80
80
suite ( 'returns undefined when' , ( ) => {
81
81
test ( 'output does not match' , async ( ) => {
82
- strictEqual ( await ( getQuickFixesForCommand ( terminal , createCommand ( command , `invalid output` , GitSimilarOutputRegex , exitCode ) , expectedMap , openerService ) ) , undefined ) ;
82
+ strictEqual ( await ( getQuickFixesForCommand ( [ ] , terminal , createCommand ( command , `invalid output` , GitSimilarOutputRegex , exitCode ) , expectedMap , openerService ) ) , undefined ) ;
83
83
} ) ;
84
84
test ( 'command does not match' , async ( ) => {
85
- strictEqual ( await ( getQuickFixesForCommand ( terminal , createCommand ( `gt sttatus` , output , GitSimilarOutputRegex , exitCode ) , expectedMap , openerService ) ) , undefined ) ;
85
+ strictEqual ( await ( getQuickFixesForCommand ( [ ] , terminal , createCommand ( `gt sttatus` , output , GitSimilarOutputRegex , exitCode ) , expectedMap , openerService ) ) , undefined ) ;
86
86
} ) ;
87
87
} ) ;
88
88
suite ( 'returns undefined when' , ( ) => {
89
89
test ( 'expected unix exit code' , async ( ) => {
90
- assertMatchOptions ( ( await getQuickFixesForCommand ( terminal , createCommand ( command , output , GitSimilarOutputRegex , exitCode ) , expectedMap , openerService ) ) ?. fixes , actions ) ;
90
+ assertMatchOptions ( ( await getQuickFixesForCommand ( [ ] , terminal , createCommand ( command , output , GitSimilarOutputRegex , exitCode ) , expectedMap , openerService ) ) ?. fixes , actions ) ;
91
91
} ) ;
92
92
test ( 'matching exit status' , async ( ) => {
93
- assertMatchOptions ( ( await getQuickFixesForCommand ( terminal , createCommand ( command , output , GitSimilarOutputRegex , 2 ) , expectedMap , openerService ) ) ?. fixes , actions ) ;
93
+ assertMatchOptions ( ( await getQuickFixesForCommand ( [ ] , terminal , createCommand ( command , output , GitSimilarOutputRegex , 2 ) , expectedMap , openerService ) ) ?. fixes , actions ) ;
94
94
} ) ;
95
95
} ) ;
96
96
suite ( 'returns match' , ( ) => {
97
97
test ( 'returns match' , async ( ) => {
98
- assertMatchOptions ( ( await getQuickFixesForCommand ( terminal , createCommand ( command , output , GitSimilarOutputRegex ) , expectedMap , openerService ) ) ?. fixes , actions ) ;
98
+ assertMatchOptions ( ( await getQuickFixesForCommand ( [ ] , terminal , createCommand ( command , output , GitSimilarOutputRegex ) , expectedMap , openerService ) ) ?. fixes , actions ) ;
99
99
} ) ;
100
100
101
101
test ( 'returns multiple match' , async ( ) => {
@@ -117,14 +117,14 @@ suite('QuickFixAddon', () => {
117
117
tooltip : 'Run: git push' ,
118
118
command : 'git push'
119
119
} ] ;
120
- assertMatchOptions ( ( await getQuickFixesForCommand ( terminal , createCommand ( 'git pu' , output , GitSimilarOutputRegex ) , expectedMap , openerService ) ) ?. fixes , actions ) ;
120
+ assertMatchOptions ( ( await getQuickFixesForCommand ( [ ] , terminal , createCommand ( 'git pu' , output , GitSimilarOutputRegex ) , expectedMap , openerService ) ) ?. fixes , actions ) ;
121
121
} ) ;
122
122
test ( 'passes any arguments through' , async ( ) => {
123
123
output = `git: 'checkoutt' is not a git command. See 'git --help'.
124
124
125
125
The most similar commands are
126
126
checkout` ;
127
- assertMatchOptions ( ( await getQuickFixesForCommand ( terminal , createCommand ( 'git checkoutt .' , output , GitSimilarOutputRegex ) , expectedMap , openerService ) ) ?. fixes , [ {
127
+ assertMatchOptions ( ( await getQuickFixesForCommand ( [ ] , terminal , createCommand ( 'git checkoutt .' , output , GitSimilarOutputRegex ) , expectedMap , openerService ) ) ?. fixes , [ {
128
128
id : 'Git Similar' ,
129
129
enabled : true ,
130
130
label : 'Run: git checkout .' ,
@@ -153,18 +153,18 @@ suite('QuickFixAddon', () => {
153
153
} ) ;
154
154
suite ( 'returns undefined when' , ( ) => {
155
155
test ( 'output does not match' , async ( ) => {
156
- strictEqual ( ( await getQuickFixesForCommand ( terminal , createCommand ( command , `invalid output` , GitTwoDashesRegex , exitCode ) , expectedMap , openerService ) ) , undefined ) ;
156
+ strictEqual ( ( await getQuickFixesForCommand ( [ ] , terminal , createCommand ( command , `invalid output` , GitTwoDashesRegex , exitCode ) , expectedMap , openerService ) ) , undefined ) ;
157
157
} ) ;
158
158
test ( 'command does not match' , async ( ) => {
159
- strictEqual ( ( await getQuickFixesForCommand ( terminal , createCommand ( `gt sttatus` , output , GitTwoDashesRegex , exitCode ) , expectedMap , openerService ) ) , undefined ) ;
159
+ strictEqual ( ( await getQuickFixesForCommand ( [ ] , terminal , createCommand ( `gt sttatus` , output , GitTwoDashesRegex , exitCode ) , expectedMap , openerService ) ) , undefined ) ;
160
160
} ) ;
161
161
} ) ;
162
162
suite ( 'returns undefined when' , ( ) => {
163
163
test ( 'expected unix exit code' , async ( ) => {
164
- assertMatchOptions ( ( await getQuickFixesForCommand ( terminal , createCommand ( command , output , GitTwoDashesRegex , exitCode ) , expectedMap , openerService ) ) ?. fixes , actions ) ;
164
+ assertMatchOptions ( ( await getQuickFixesForCommand ( [ ] , terminal , createCommand ( command , output , GitTwoDashesRegex , exitCode ) , expectedMap , openerService ) ) ?. fixes , actions ) ;
165
165
} ) ;
166
166
test ( 'matching exit status' , async ( ) => {
167
- assertMatchOptions ( ( await getQuickFixesForCommand ( terminal , createCommand ( command , output , GitTwoDashesRegex , 2 ) , expectedMap , openerService ) ) ?. fixes , actions ) ;
167
+ assertMatchOptions ( ( await getQuickFixesForCommand ( [ ] , terminal , createCommand ( command , output , GitTwoDashesRegex , 2 ) , expectedMap , openerService ) ) ?. fixes , actions ) ;
168
168
} ) ;
169
169
} ) ;
170
170
} ) ;
@@ -200,11 +200,11 @@ suite('QuickFixAddon', () => {
200
200
} ) ;
201
201
suite ( 'returns undefined when' , ( ) => {
202
202
test ( 'output does not match' , async ( ) => {
203
- strictEqual ( ( await getQuickFixesForCommand ( terminal , createCommand ( portCommand , `invalid output` , FreePortOutputRegex ) , expectedMap , openerService ) ) ?. fixes , undefined ) ;
203
+ strictEqual ( ( await getQuickFixesForCommand ( [ ] , terminal , createCommand ( portCommand , `invalid output` , FreePortOutputRegex ) , expectedMap , openerService ) ) ?. fixes , undefined ) ;
204
204
} ) ;
205
205
} ) ;
206
206
test ( 'returns actions' , async ( ) => {
207
- assertMatchOptions ( ( await getQuickFixesForCommand ( terminal , createCommand ( portCommand , output , FreePortOutputRegex ) , expectedMap , openerService ) ) ?. fixes , actionOptions ) ;
207
+ assertMatchOptions ( ( await getQuickFixesForCommand ( [ ] , terminal , createCommand ( portCommand , output , FreePortOutputRegex ) , expectedMap , openerService ) ) ?. fixes , actionOptions ) ;
208
208
} ) ;
209
209
} ) ;
210
210
}
@@ -231,18 +231,18 @@ suite('QuickFixAddon', () => {
231
231
} ) ;
232
232
suite ( 'returns undefined when' , ( ) => {
233
233
test ( 'output does not match' , async ( ) => {
234
- strictEqual ( ( await getQuickFixesForCommand ( terminal , createCommand ( command , `invalid output` , GitPushOutputRegex , exitCode ) , expectedMap , openerService ) ) , undefined ) ;
234
+ strictEqual ( ( await getQuickFixesForCommand ( [ ] , terminal , createCommand ( command , `invalid output` , GitPushOutputRegex , exitCode ) , expectedMap , openerService ) ) , undefined ) ;
235
235
} ) ;
236
236
test ( 'command does not match' , async ( ) => {
237
- strictEqual ( ( await getQuickFixesForCommand ( terminal , createCommand ( `git status` , output , GitPushOutputRegex , exitCode ) , expectedMap , openerService ) ) , undefined ) ;
237
+ strictEqual ( ( await getQuickFixesForCommand ( [ ] , terminal , createCommand ( `git status` , output , GitPushOutputRegex , exitCode ) , expectedMap , openerService ) ) , undefined ) ;
238
238
} ) ;
239
239
} ) ;
240
240
suite ( 'returns actions when' , ( ) => {
241
241
test ( 'expected unix exit code' , async ( ) => {
242
- assertMatchOptions ( ( await getQuickFixesForCommand ( terminal , createCommand ( command , output , GitPushOutputRegex , exitCode ) , expectedMap , openerService ) ) ?. fixes , actions ) ;
242
+ assertMatchOptions ( ( await getQuickFixesForCommand ( [ ] , terminal , createCommand ( command , output , GitPushOutputRegex , exitCode ) , expectedMap , openerService ) ) ?. fixes , actions ) ;
243
243
} ) ;
244
244
test ( 'matching exit status' , async ( ) => {
245
- assertMatchOptions ( ( await getQuickFixesForCommand ( terminal , createCommand ( command , output , GitPushOutputRegex , 2 ) , expectedMap , openerService ) ) ?. fixes , actions ) ;
245
+ assertMatchOptions ( ( await getQuickFixesForCommand ( [ ] , terminal , createCommand ( command , output , GitPushOutputRegex , 2 ) , expectedMap , openerService ) ) ?. fixes , actions ) ;
246
246
} ) ;
247
247
} ) ;
248
248
} ) ;
@@ -272,18 +272,18 @@ suite('QuickFixAddon', () => {
272
272
} ) ;
273
273
suite ( 'returns undefined when' , ( ) => {
274
274
test ( 'output does not match' , async ( ) => {
275
- strictEqual ( ( await getQuickFixesForCommand ( terminal , createCommand ( command , `invalid output` , GitCreatePrOutputRegex , exitCode ) , expectedMap , openerService ) ) , undefined ) ;
275
+ strictEqual ( ( await getQuickFixesForCommand ( [ ] , terminal , createCommand ( command , `invalid output` , GitCreatePrOutputRegex , exitCode ) , expectedMap , openerService ) ) , undefined ) ;
276
276
} ) ;
277
277
test ( 'command does not match' , async ( ) => {
278
- strictEqual ( ( await getQuickFixesForCommand ( terminal , createCommand ( `git status` , output , GitCreatePrOutputRegex , exitCode ) , expectedMap , openerService ) ) , undefined ) ;
278
+ strictEqual ( ( await getQuickFixesForCommand ( [ ] , terminal , createCommand ( `git status` , output , GitCreatePrOutputRegex , exitCode ) , expectedMap , openerService ) ) , undefined ) ;
279
279
} ) ;
280
280
test ( 'failure exit status' , async ( ) => {
281
- strictEqual ( ( await getQuickFixesForCommand ( terminal , createCommand ( command , output , GitCreatePrOutputRegex , 2 ) , expectedMap , openerService ) ) , undefined ) ;
281
+ strictEqual ( ( await getQuickFixesForCommand ( [ ] , terminal , createCommand ( command , output , GitCreatePrOutputRegex , 2 ) , expectedMap , openerService ) ) , undefined ) ;
282
282
} ) ;
283
283
} ) ;
284
284
suite ( 'returns actions when' , ( ) => {
285
285
test ( 'expected unix exit code' , async ( ) => {
286
- assertMatchOptions ( ( await getQuickFixesForCommand ( terminal , createCommand ( command , output , GitCreatePrOutputRegex , exitCode ) , expectedMap , openerService ) ) ?. fixes , actions ) ;
286
+ assertMatchOptions ( ( await getQuickFixesForCommand ( [ ] , terminal , createCommand ( command , output , GitCreatePrOutputRegex , exitCode ) , expectedMap , openerService ) ) ?. fixes , actions ) ;
287
287
} ) ;
288
288
} ) ;
289
289
} ) ;
@@ -311,18 +311,18 @@ suite('QuickFixAddon', () => {
311
311
} ) ;
312
312
suite ( 'returns undefined when' , ( ) => {
313
313
test ( 'output does not match' , async ( ) => {
314
- strictEqual ( ( await getQuickFixesForCommand ( terminal , createCommand ( command , `invalid output` , GitPushOutputRegex , exitCode ) , expectedMap , openerService ) ) , undefined ) ;
314
+ strictEqual ( ( await getQuickFixesForCommand ( [ ] , terminal , createCommand ( command , `invalid output` , GitPushOutputRegex , exitCode ) , expectedMap , openerService ) ) , undefined ) ;
315
315
} ) ;
316
316
test ( 'command does not match' , async ( ) => {
317
- strictEqual ( ( await getQuickFixesForCommand ( terminal , createCommand ( `git status` , output , GitPushOutputRegex , exitCode ) , expectedMap , openerService ) ) , undefined ) ;
317
+ strictEqual ( ( await getQuickFixesForCommand ( [ ] , terminal , createCommand ( `git status` , output , GitPushOutputRegex , exitCode ) , expectedMap , openerService ) ) , undefined ) ;
318
318
} ) ;
319
319
} ) ;
320
320
suite ( 'returns actions when' , ( ) => {
321
321
test ( 'expected unix exit code' , async ( ) => {
322
- assertMatchOptions ( ( await getQuickFixesForCommand ( terminal , createCommand ( command , output , GitPushOutputRegex , exitCode ) , expectedMap , openerService ) ) ?. fixes , actions ) ;
322
+ assertMatchOptions ( ( await getQuickFixesForCommand ( [ ] , terminal , createCommand ( command , output , GitPushOutputRegex , exitCode ) , expectedMap , openerService ) ) ?. fixes , actions ) ;
323
323
} ) ;
324
324
test ( 'matching exit status' , async ( ) => {
325
- assertMatchOptions ( ( await getQuickFixesForCommand ( terminal , createCommand ( command , output , GitPushOutputRegex , 2 ) , expectedMap , openerService ) ) ?. fixes , actions ) ;
325
+ assertMatchOptions ( ( await getQuickFixesForCommand ( [ ] , terminal , createCommand ( command , output , GitPushOutputRegex , 2 ) , expectedMap , openerService ) ) ?. fixes , actions ) ;
326
326
} ) ;
327
327
} ) ;
328
328
} ) ;
0 commit comments