File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ export class StreamingRunner implements vscode.Disposable {
8585 linkedCancellationSource . onCancellationRequested ( async ( ) => {
8686 this . run ! . appendOutput ( "\r\nTest run cancelled." ) ;
8787 abortController . abort ( ) ;
88- await this . finalize ( ) ;
88+ await this . finalize ( true ) ;
8989 } ) ;
9090
9191 if ( mode === Mode . Run ) {
@@ -248,8 +248,8 @@ export class StreamingRunner implements vscode.Disposable {
248248 return server ;
249249 }
250250
251- private async finalize ( ) {
252- if ( this . currentWorkspace ) {
251+ private async finalize ( cancellation : boolean ) {
252+ if ( cancellation && this . currentWorkspace ) {
253253 // If the tests are being executed in a terminal, send a CTRL+C signal to stop them
254254 const terminal = this . terminals . get (
255255 `${ this . currentWorkspace . workspaceFolder . name } : test` ,
@@ -294,9 +294,8 @@ export class StreamingRunner implements vscode.Disposable {
294294
295295 // Handle the JSON events being emitted by the tests
296296 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 ) ,
300299 ) ,
301300 ) ;
302301
You can’t perform that action at this time.
0 commit comments