From d080f01e10006083ad79d51f7867ea7f305537fa Mon Sep 17 00:00:00 2001 From: Aurelien Labrosse Date: Wed, 1 Apr 2020 17:04:52 +0200 Subject: [PATCH] fix: Use workspace settings.json Go config fixes #17 --- src/goTestExplorer.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/goTestExplorer.ts b/src/goTestExplorer.ts index 3f4b898..1af13f4 100644 --- a/src/goTestExplorer.ts +++ b/src/goTestExplorer.ts @@ -64,10 +64,13 @@ export class GoTestExplorer { private buildTestConfig(testNode: TestNode): TestConfig { let tests = testNode.children.map(node => node.name); tests = tests.length > 0 ? tests : [testNode.name]; + const config = vscode.workspace.getConfiguration('go', testNode.uri); + const flags = config.get('testFlags', [""]); + const testConfig = { dir: path.dirname(testNode.uri.fsPath), - goConfig: vscode.workspace.getConfiguration('go', testNode.uri), - flags: [""], + goConfig: config, + flags: flags, functions: tests, testUri: testNode.uri, testName: path.basename(testNode.uri.fsPath) @@ -157,4 +160,4 @@ export class GoTestExplorer { return symbols[0]; } -} \ No newline at end of file +}