File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -247,6 +247,7 @@ export class TestClient<Configuration> {
247247 const buildCompleted = this . buildCompleted ( ) ;
248248
249249 if ( this . watchEnabled ) {
250+ console . log ( "Send DidChangeWatchedFiles" ) ;
250251 await this . client . sendNotification ( DidChangeWatchedFilesNotification . type , {
251252 changes : [ {
252253 type : exists ? FileChangeType . Changed : FileChangeType . Created ,
@@ -308,12 +309,20 @@ export class TestClient<Configuration> {
308309 } ) ;
309310 }
310311
312+ private builds = 0 ;
313+
311314 // TODO: Duplicated code
312315 private buildCompleted ( ) {
313316 return new Promise < void > ( ( resolve ) => {
314317 this . client . onRequest ( WorkDoneProgressCreateRequest . type , ( { token } ) => {
315318 this . client . onProgress ( WorkDoneProgress . type , token , ( { kind } ) => {
316- if ( kind === "end" ) {
319+ if ( kind === "begin" ) {
320+ this . builds ++ ;
321+ } else if ( kind === "end" ) {
322+ this . builds -- ;
323+ }
324+
325+ if ( this . builds === 0 ) {
317326 resolve ( ) ;
318327 }
319328 } ) ;
You can’t perform that action at this time.
0 commit comments