@@ -12,9 +12,8 @@ import { GoDebugConfigurationProvider } from '../../src/goDebugConfiguration';
1212import { updateGoVarsFromConfig } from '../../src/goInstallTools' ;
1313import { rmdirRecursive } from '../../src/util' ;
1414import goEnv = require( '../../src/goEnv' ) ;
15- import { isInPreviewMode } from '../../src/goLanguageServer' ;
1615import { MockCfg } from '../mocks/MockCfg' ;
17- import { fileURLToPath } from 'url ' ;
16+ import { extensionId } from '../../src/const ' ;
1817
1918suite ( 'Debug Environment Variable Merge Test' , ( ) => {
2019 const debugConfigProvider = new GoDebugConfigurationProvider ( ) ;
@@ -222,6 +221,9 @@ suite('Debug Configuration Merge User Settings', () => {
222221
223222 suite ( "merge 'go' config from settings.json" , ( ) => {
224223 test ( 'default settings are applied' , async ( ) => {
224+ const defaultConfig = vscode . extensions . getExtension ( extensionId ) . packageJSON . contributes . configuration
225+ . properties [ 'go.delveConfig' ] . properties ;
226+
225227 // Run resolveDebugConfiguration with the default workspace settings.
226228 const cfg1 = {
227229 name : 'Launch' ,
@@ -233,14 +235,14 @@ suite('Debug Configuration Merge User Settings', () => {
233235
234236 const defaultResult = await debugConfigProvider . resolveDebugConfiguration ( undefined , cfg1 ) ;
235237
236- assert . strictEqual ( defaultResult . showGlobalVariables , false ) ;
237- assert . strictEqual ( defaultResult . showRegisters , false ) ;
238- assert . strictEqual ( defaultResult . hideSystemGoroutines , false ) ;
239- assert . strictEqual ( defaultResult . showLog , false ) ;
240- assert . strictEqual ( defaultResult . logOutput , 'debugger' ) ;
241- assert . strictEqual ( defaultResult . debugAdapter , 'dlv-dap' ) ;
242- assert . deepStrictEqual ( defaultResult . dlvFlags , [ ] ) ;
243- assert . deepStrictEqual ( defaultResult . substitutePath , [ ] ) ;
238+ assert . strictEqual ( defaultResult . showGlobalVariables , defaultConfig . showGlobalVariables . default ) ;
239+ assert . strictEqual ( defaultResult . showRegisters , defaultConfig . showRegisters . default ) ;
240+ assert . strictEqual ( defaultResult . hideSystemGoroutines , defaultConfig . hideSystemGoroutines . default ) ;
241+ assert . strictEqual ( defaultResult . showLog , defaultConfig . showLog . default ) ;
242+ assert . strictEqual ( defaultResult . logOutput , defaultConfig . logOutput . default ) ;
243+ assert . strictEqual ( defaultResult . debugAdapter , defaultConfig . debugAdapter . default ) ;
244+ assert . deepStrictEqual ( defaultResult . dlvFlags , defaultConfig . dlvFlags . default ) ;
245+ assert . deepStrictEqual ( defaultResult . substitutePath , defaultConfig . substitutePath . default ) ;
244246 } ) ;
245247
246248 test ( 'go flags config does not affect debug config' , async ( ) => {
0 commit comments