@@ -376,14 +376,12 @@ suite("DiagnosticsManager Test Suite", async function () {
376376 test ( "Parse partial line" , async ( ) => {
377377 const fixture = testSwiftTask ( "swift" , [ "build" ] , workspaceFolder , toolchain ) ;
378378 await vscode . tasks . executeTask ( fixture . task ) ;
379- const diagnosticsPromise = Promise . resolve ( ) ; // waitForDiagnostics([mainUri]);
380379 // Wait to spawn before writing
381380 fixture . process . write ( `${ mainUri . fsPath } :13:5: err` , "" ) ;
382381 fixture . process . write ( "or: Cannot find 'fo" , "" ) ;
383382 fixture . process . write ( "o' in scope" ) ;
384383 fixture . process . close ( 1 ) ;
385384 await waitForNoRunningTasks ( ) ;
386- await diagnosticsPromise ;
387385 // Should have parsed
388386 assertHasDiagnostic ( mainUri , outputDiagnostic ) ;
389387 } ) ;
@@ -392,15 +390,13 @@ suite("DiagnosticsManager Test Suite", async function () {
392390 test ( "Ignore duplicates" , async ( ) => {
393391 const fixture = testSwiftTask ( "swift" , [ "build" ] , workspaceFolder , toolchain ) ;
394392 await vscode . tasks . executeTask ( fixture . task ) ;
395- const diagnosticsPromise = Promise . resolve ( ) ; // waitForDiagnostics([mainUri]);
396393 // Wait to spawn before writing
397394 const output = `${ mainUri . fsPath } :13:5: error: Cannot find 'foo' in scope` ;
398395 fixture . process . write ( output ) ;
399396 fixture . process . write ( "some random output" ) ;
400397 fixture . process . write ( output ) ;
401398 fixture . process . close ( 1 ) ;
402399 await waitForNoRunningTasks ( ) ;
403- await diagnosticsPromise ;
404400 const diagnostics = vscode . languages . getDiagnostics ( mainUri ) ;
405401 // Should only include one
406402 assert . equal ( diagnostics . length , 1 ) ;
@@ -410,12 +406,10 @@ suite("DiagnosticsManager Test Suite", async function () {
410406 test ( "New set of swiftc diagnostics clear old list" , async ( ) => {
411407 let fixture = testSwiftTask ( "swift" , [ "build" ] , workspaceFolder , toolchain ) ;
412408 await vscode . tasks . executeTask ( fixture . task ) ;
413- let diagnosticsPromise = Promise . resolve ( ) ; // waitForDiagnostics([mainUri]);
414409 // Wait to spawn before writing
415410 fixture . process . write ( `${ mainUri . fsPath } :13:5: error: Cannot find 'foo' in scope` ) ;
416411 fixture . process . close ( 1 ) ;
417412 await waitForNoRunningTasks ( ) ;
418- await diagnosticsPromise ;
419413 let diagnostics = vscode . languages . getDiagnostics ( mainUri ) ;
420414 // Should only include one
421415 assert . equal ( diagnostics . length , 1 ) ;
@@ -424,10 +418,8 @@ suite("DiagnosticsManager Test Suite", async function () {
424418 // Run again but no diagnostics returned
425419 fixture = testSwiftTask ( "swift" , [ "build" ] , workspaceFolder , toolchain ) ;
426420 await vscode . tasks . executeTask ( fixture . task ) ;
427- diagnosticsPromise = Promise . resolve ( ) ; // waitForDiagnostics([mainUri]);
428421 fixture . process . close ( 0 ) ;
429422 await waitForNoRunningTasks ( ) ;
430- await diagnosticsPromise ;
431423 diagnostics = vscode . languages . getDiagnostics ( mainUri ) ;
432424 // Should have cleaned up
433425 assert . equal ( diagnostics . length , 0 ) ;
0 commit comments