Skip to content

Commit

Permalink
fix: Use workspace settings.json Go config
Browse files Browse the repository at this point in the history
  • Loading branch information
arcadien committed Apr 1, 2020
1 parent e856d14 commit d080f01
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/goTestExplorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -157,4 +160,4 @@ export class GoTestExplorer {
return symbols[0];
}

}
}

0 comments on commit d080f01

Please sign in to comment.