Skip to content

Commit

Permalink
fix: correct creating run profiles if you use a single workspace folder
Browse files Browse the repository at this point in the history
  • Loading branch information
d-biehl committed Nov 20, 2023
1 parent cc68f35 commit e5430ec
Showing 1 changed file with 27 additions and 29 deletions.
56 changes: 27 additions & 29 deletions vscode-client/testcontrollermanager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,41 +294,39 @@ export class TestControllerManager {

const folderName = multiFolders ? ` (${folder.name})` : "";

if (multiFolders) {
const runProfile = this.testController.createRunProfile(
"Run" + folderName,
vscode.TestRunProfileKind.Run,
async (request, token) => this.runTests(request, token, undefined),
false,
folderTag,
const runProfile = this.testController.createRunProfile(
"Run" + folderName,
vscode.TestRunProfileKind.Run,
async (request, token) => this.runTests(request, token, undefined),
false,
folderTag,
);

runProfile.configureHandler = () => {
this.configureRunProfile().then(
(_) => undefined,
(_) => undefined,
);
};

runProfile.configureHandler = () => {
this.configureRunProfile().then(
(_) => undefined,
(_) => undefined,
);
};
this.runProfiles.push(runProfile);

this.runProfiles.push(runProfile);
const debugProfile = this.testController.createRunProfile(
"Debug" + folderName,
vscode.TestRunProfileKind.Debug,
async (request, token) => this.runTests(request, token, undefined),
false,
folderTag,
);

const debugProfile = this.testController.createRunProfile(
"Debug" + folderName,
vscode.TestRunProfileKind.Debug,
async (request, token) => this.runTests(request, token, undefined),
false,
folderTag,
debugProfile.configureHandler = () => {
this.configureRunProfile().then(
(_) => undefined,
(_) => undefined,
);
};

debugProfile.configureHandler = () => {
this.configureRunProfile().then(
(_) => undefined,
(_) => undefined,
);
};

this.runProfiles.push(debugProfile);
}
this.runProfiles.push(debugProfile);

const configurations = vscode.workspace
.getConfiguration("launch", folder)
Expand Down

0 comments on commit e5430ec

Please sign in to comment.