diff --git a/extension/src/goTest.ts b/extension/src/goTest.ts index edc2460605..3799a07407 100644 --- a/extension/src/goTest.ts +++ b/extension/src/goTest.ts @@ -225,6 +225,7 @@ async function runTestAtCursor( functions: testConfigFns, isBenchmark: cmd === 'benchmark', isMod, + background: !!args?.background, applyCodeCoverage: goConfig.get('coverOnSingleTest') }; // Remember this config as the last executed test. @@ -326,6 +327,7 @@ export function testCurrentPackage(isBenchmark: boolean): CommandFactory { flags: getTestFlags(goConfig, args), isBenchmark, isMod, + background: !!args?.background, applyCodeCoverage: goConfig.get('coverOnTestPackage') }; // Remember this config as the last executed test. @@ -356,6 +358,7 @@ export const testWorkspace: CommandFactory = () => (args: any) => { const testConfig: TestConfig = { goConfig, dir: workspaceUri.fsPath, + background: !!args?.background, flags: getTestFlags(goConfig, args), includeSubDirectories: true }; @@ -403,6 +406,7 @@ export function testCurrentFile(isBenchmark: boolean, getConfig = getGoConfig): functions: testFunctions?.map((sym) => sym.name), isBenchmark, isMod, + background: !!args?.background, applyCodeCoverage: goConfig.get('coverOnSingleTestFile') }; // Remember this config as the last executed test.