File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ export class StreamingRunner implements vscode.Disposable {
85
85
linkedCancellationSource . onCancellationRequested ( async ( ) => {
86
86
this . run ! . appendOutput ( "\r\nTest run cancelled." ) ;
87
87
abortController . abort ( ) ;
88
- await this . finalize ( ) ;
88
+ await this . finalize ( true ) ;
89
89
} ) ;
90
90
91
91
if ( mode === Mode . Run ) {
@@ -248,8 +248,8 @@ export class StreamingRunner implements vscode.Disposable {
248
248
return server ;
249
249
}
250
250
251
- private async finalize ( ) {
252
- if ( this . currentWorkspace ) {
251
+ private async finalize ( cancellation : boolean ) {
252
+ if ( cancellation && this . currentWorkspace ) {
253
253
// If the tests are being executed in a terminal, send a CTRL+C signal to stop them
254
254
const terminal = this . terminals . get (
255
255
`${ this . currentWorkspace . workspaceFolder . name } : test` ,
@@ -294,9 +294,8 @@ export class StreamingRunner implements vscode.Disposable {
294
294
295
295
// Handle the JSON events being emitted by the tests
296
296
this . disposables . push (
297
- this . connection . onNotification (
298
- NOTIFICATION_TYPES . finish ,
299
- this . finalize . bind ( this ) ,
297
+ this . connection . onNotification ( NOTIFICATION_TYPES . finish , ( ) =>
298
+ this . finalize ( false ) ,
300
299
) ,
301
300
) ;
302
301
You can’t perform that action at this time.
0 commit comments