@@ -445,7 +445,7 @@ suite('Debug Configuration Modify User Config', () => {
445
445
assert . strictEqual ( got . removed , tc . want . removed , `removed for ${ tc . input } does not match expected` ) ;
446
446
} ) ;
447
447
} ) ;
448
- test ( 'remove user set -gcflags in buildFlags' , ( ) => {
448
+ test ( 'remove user set -gcflags in buildFlags' , async ( ) => {
449
449
const config = {
450
450
name : 'Launch' ,
451
451
type : 'go' ,
@@ -456,10 +456,10 @@ suite('Debug Configuration Modify User Config', () => {
456
456
buildFlags : '-race -gcflags=-l -mod=mod'
457
457
} ;
458
458
459
- debugConfigProvider . resolveDebugConfiguration ( undefined , config ) ;
459
+ await debugConfigProvider . resolveDebugConfiguration ( undefined , config ) ;
460
460
assert . strictEqual ( config . buildFlags , '-race -mod=mod' ) ;
461
461
} ) ;
462
- test ( 'remove user set -gcflags in GOFLAGS' , ( ) => {
462
+ test ( 'remove user set -gcflags in GOFLAGS' , async ( ) => {
463
463
const config = {
464
464
name : 'Launch' ,
465
465
type : 'go' ,
@@ -469,7 +469,7 @@ suite('Debug Configuration Modify User Config', () => {
469
469
env : { GOFLAGS : '-race -gcflags=-l -mod=mod' }
470
470
} ;
471
471
472
- debugConfigProvider . resolveDebugConfiguration ( undefined , config ) ;
472
+ await debugConfigProvider . resolveDebugConfiguration ( undefined , config ) ;
473
473
474
474
assert . strictEqual ( config . env . GOFLAGS , '-race -mod=mod' ) ;
475
475
} ) ;
@@ -478,7 +478,7 @@ suite('Debug Configuration Modify User Config', () => {
478
478
479
479
suite ( 'Debug Configuration Resolve Paths' , ( ) => {
480
480
const debugConfigProvider = new GoDebugConfigurationProvider ( ) ;
481
- test ( 'resolve ~ in cwd' , ( ) => {
481
+ test ( 'resolve ~ in cwd' , async ( ) => {
482
482
const config = {
483
483
name : 'Launch' ,
484
484
type : 'go' ,
@@ -488,11 +488,11 @@ suite('Debug Configuration Resolve Paths', () => {
488
488
cwd : '~/main.go'
489
489
} ;
490
490
491
- debugConfigProvider . resolveDebugConfiguration ( undefined , config ) ;
491
+ await debugConfigProvider . resolveDebugConfiguration ( undefined , config ) ;
492
492
assert . notStrictEqual ( config . cwd , '~/main.go' ) ;
493
493
} ) ;
494
494
495
- test ( 'do not resolve workspaceFolder or fileDirname' , ( ) => {
495
+ test ( 'do not resolve workspaceFolder or fileDirname' , async ( ) => {
496
496
const config = {
497
497
name : 'Launch' ,
498
498
type : 'go' ,
@@ -502,7 +502,7 @@ suite('Debug Configuration Resolve Paths', () => {
502
502
cwd : '${workspaceFolder}'
503
503
} ;
504
504
505
- debugConfigProvider . resolveDebugConfiguration ( undefined , config ) ;
505
+ await debugConfigProvider . resolveDebugConfiguration ( undefined , config ) ;
506
506
507
507
assert . strictEqual ( config . cwd , '${workspaceFolder}' ) ;
508
508
assert . strictEqual ( config . program , '${fileDirname}' ) ;
@@ -842,7 +842,7 @@ suite('Debug Configuration Converts Relative Paths', () => {
842
842
843
843
suite ( 'Debug Configuration Auto Mode' , ( ) => {
844
844
const debugConfigProvider = new GoDebugConfigurationProvider ( ) ;
845
- test ( 'resolve auto to debug with non-test file' , ( ) => {
845
+ test ( 'resolve auto to debug with non-test file' , async ( ) => {
846
846
const config = {
847
847
name : 'Launch' ,
848
848
type : 'go' ,
@@ -851,12 +851,12 @@ suite('Debug Configuration Auto Mode', () => {
851
851
program : '/path/to/main.go'
852
852
} ;
853
853
854
- debugConfigProvider . resolveDebugConfiguration ( undefined , config ) ;
854
+ await debugConfigProvider . resolveDebugConfiguration ( undefined , config ) ;
855
855
assert . strictEqual ( config . mode , 'debug' ) ;
856
856
assert . strictEqual ( config . program , '/path/to/main.go' ) ;
857
857
} ) ;
858
858
859
- test ( 'resolve auto to debug with test file' , ( ) => {
859
+ test ( 'resolve auto to debug with test file' , async ( ) => {
860
860
const config = {
861
861
name : 'Launch' ,
862
862
type : 'go' ,
@@ -865,15 +865,15 @@ suite('Debug Configuration Auto Mode', () => {
865
865
program : '/path/to/main_test.go'
866
866
} ;
867
867
868
- debugConfigProvider . resolveDebugConfiguration ( undefined , config ) ;
868
+ await debugConfigProvider . resolveDebugConfiguration ( undefined , config ) ;
869
869
assert . strictEqual ( config . mode , 'test' ) ;
870
870
assert . strictEqual ( config . program , '/path/to' ) ;
871
871
} ) ;
872
872
} ) ;
873
873
874
874
suite ( 'Debug Configuration Default DebugAdapter' , ( ) => {
875
875
const debugConfigProvider = new GoDebugConfigurationProvider ( ) ;
876
- test ( "default debugAdapter should be 'dlv-dap'" , ( ) => {
876
+ test ( "default debugAdapter should be 'dlv-dap'" , async ( ) => {
877
877
const config = {
878
878
name : 'Launch' ,
879
879
type : 'go' ,
@@ -882,12 +882,12 @@ suite('Debug Configuration Default DebugAdapter', () => {
882
882
program : '/path/to/main.go'
883
883
} ;
884
884
885
- debugConfigProvider . resolveDebugConfiguration ( undefined , config ) ;
885
+ await debugConfigProvider . resolveDebugConfiguration ( undefined , config ) ;
886
886
const resolvedConfig = config as any ;
887
887
assert . strictEqual ( resolvedConfig [ 'debugAdapter' ] , 'dlv-dap' ) ;
888
888
} ) ;
889
889
890
- test ( "default debugAdapter for remote mode should be always 'legacy'" , ( ) => {
890
+ test ( "default debugAdapter for remote mode should be always 'legacy'" , async ( ) => {
891
891
const config = {
892
892
name : 'Attach' ,
893
893
type : 'go' ,
@@ -898,12 +898,12 @@ suite('Debug Configuration Default DebugAdapter', () => {
898
898
} ;
899
899
900
900
const want = 'legacy' ; // Remote mode defaults to legacy mode.
901
- debugConfigProvider . resolveDebugConfiguration ( undefined , config ) ;
901
+ await debugConfigProvider . resolveDebugConfiguration ( undefined , config ) ;
902
902
const resolvedConfig = config as any ;
903
903
assert . strictEqual ( resolvedConfig [ 'debugAdapter' ] , want ) ;
904
904
} ) ;
905
905
906
- test ( 'debugAdapter=dlv-dap is allowed with remote mode' , ( ) => {
906
+ test ( 'debugAdapter=dlv-dap is allowed with remote mode' , async ( ) => {
907
907
const config = {
908
908
name : 'Attach' ,
909
909
type : 'go' ,
@@ -915,7 +915,7 @@ suite('Debug Configuration Default DebugAdapter', () => {
915
915
} ;
916
916
917
917
const want = 'dlv-dap' ; // If requested, dlv-dap is preserved.
918
- debugConfigProvider . resolveDebugConfiguration ( undefined , config ) ;
918
+ await debugConfigProvider . resolveDebugConfiguration ( undefined , config ) ;
919
919
const resolvedConfig = config as any ;
920
920
assert . strictEqual ( resolvedConfig [ 'debugAdapter' ] , want ) ;
921
921
} ) ;
0 commit comments