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 +}