@@ -401,14 +401,12 @@ suite("DiagnosticsManager Test Suite", async function () {
401401 test ( "Parse partial line" , async ( ) => {
402402 const fixture = testSwiftTask ( "swift" , [ "build" ] , workspaceFolder , toolchain ) ;
403403 await vscode . tasks . executeTask ( fixture . task ) ;
404- const diagnosticsPromise = Promise . resolve ( ) ; // waitForDiagnostics([mainUri]);
405404 // Wait to spawn before writing
406405 fixture . process . write ( `${ mainUri . fsPath } :13:5: err` , "" ) ;
407406 fixture . process . write ( "or: Cannot find 'fo" , "" ) ;
408407 fixture . process . write ( "o' in scope" ) ;
409408 fixture . process . close ( 1 ) ;
410409 await waitForNoRunningTasks ( ) ;
411- await diagnosticsPromise ;
412410 // Should have parsed
413411 assertHasDiagnostic ( mainUri , outputDiagnostic ) ;
414412 } ) ;
@@ -417,15 +415,13 @@ suite("DiagnosticsManager Test Suite", async function () {
417415 test ( "Ignore duplicates" , async ( ) => {
418416 const fixture = testSwiftTask ( "swift" , [ "build" ] , workspaceFolder , toolchain ) ;
419417 await vscode . tasks . executeTask ( fixture . task ) ;
420- const diagnosticsPromise = Promise . resolve ( ) ; // waitForDiagnostics([mainUri]);
421418 // Wait to spawn before writing
422419 const output = `${ mainUri . fsPath } :13:5: error: Cannot find 'foo' in scope` ;
423420 fixture . process . write ( output ) ;
424421 fixture . process . write ( "some random output" ) ;
425422 fixture . process . write ( output ) ;
426423 fixture . process . close ( 1 ) ;
427424 await waitForNoRunningTasks ( ) ;
428- await diagnosticsPromise ;
429425 const diagnostics = vscode . languages . getDiagnostics ( mainUri ) ;
430426 // Should only include one
431427 assert . equal ( diagnostics . length , 1 ) ;
@@ -435,12 +431,10 @@ suite("DiagnosticsManager Test Suite", async function () {
435431 test ( "New set of swiftc diagnostics clear old list" , async ( ) => {
436432 let fixture = testSwiftTask ( "swift" , [ "build" ] , workspaceFolder , toolchain ) ;
437433 await vscode . tasks . executeTask ( fixture . task ) ;
438- let diagnosticsPromise = Promise . resolve ( ) ; // waitForDiagnostics([mainUri]);
439434 // Wait to spawn before writing
440435 fixture . process . write ( `${ mainUri . fsPath } :13:5: error: Cannot find 'foo' in scope` ) ;
441436 fixture . process . close ( 1 ) ;
442437 await waitForNoRunningTasks ( ) ;
443- await diagnosticsPromise ;
444438 let diagnostics = vscode . languages . getDiagnostics ( mainUri ) ;
445439 // Should only include one
446440 assert . equal ( diagnostics . length , 1 ) ;
@@ -449,10 +443,8 @@ suite("DiagnosticsManager Test Suite", async function () {
449443 // Run again but no diagnostics returned
450444 fixture = testSwiftTask ( "swift" , [ "build" ] , workspaceFolder , toolchain ) ;
451445 await vscode . tasks . executeTask ( fixture . task ) ;
452- diagnosticsPromise = Promise . resolve ( ) ; // waitForDiagnostics([mainUri]);
453446 fixture . process . close ( 0 ) ;
454447 await waitForNoRunningTasks ( ) ;
455- await diagnosticsPromise ;
456448 diagnostics = vscode . languages . getDiagnostics ( mainUri ) ;
457449 // Should have cleaned up
458450 assert . equal ( diagnostics . length , 0 ) ;
0 commit comments