Skip to content

Commit 21902d5

Browse files
committed
Add args.background to go.test TestConfig objects
1 parent c97d82d commit 21902d5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

extension/src/goTest.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ async function runTestAtCursor(
219219
functions: testConfigFns,
220220
isBenchmark: cmd === 'benchmark',
221221
isMod,
222+
background: !!args?.background,
222223
applyCodeCoverage: goConfig.get<boolean>('coverOnSingleTest')
223224
};
224225
// Remember this config as the last executed test.
@@ -319,6 +320,7 @@ export function testCurrentPackage(isBenchmark: boolean): CommandFactory {
319320
flags: getTestFlags(goConfig, args),
320321
isBenchmark,
321322
isMod,
323+
background: !!args?.background,
322324
applyCodeCoverage: goConfig.get<boolean>('coverOnTestPackage')
323325
};
324326
// Remember this config as the last executed test.
@@ -350,6 +352,7 @@ export const testWorkspace: CommandFactory = () => (args: any) => {
350352
goConfig,
351353
dir: workspaceUri.fsPath,
352354
flags: getTestFlags(goConfig, args),
355+
background: !!args?.background,
353356
includeSubDirectories: true
354357
};
355358
// Remember this config as the last executed test.
@@ -396,6 +399,7 @@ export function testCurrentFile(isBenchmark: boolean, getConfig = getGoConfig):
396399
functions: testFunctions?.map((sym) => sym.name),
397400
isBenchmark,
398401
isMod,
402+
background: !!args?.background,
399403
applyCodeCoverage: goConfig.get<boolean>('coverOnSingleTestFile')
400404
};
401405
// Remember this config as the last executed test.

0 commit comments

Comments
 (0)