Skip to content

Commit

Permalink
Correct camelCase in tests.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
cskeogh committed Jul 2, 2024
1 parent 4c605f8 commit 0168c7f
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,24 @@ function deleteTestsFromControllerNotVisited(
controller: vscode.TestController,
testsVisited: WeakMap<vscode.TestItem, boolean>,
) {
for (const [test_id, test] of controller.items) {
for (const [testId, test] of controller.items) {
if (testsVisited.get(test) == undefined) {
for (const [child_id] of test.children) {
test.children.delete(child_id);
for (const [ChildId] of test.children) {
test.children.delete(ChildId);
}
controller.items.delete(test_id);
controller.items.delete(testId);
} else {
for (const [child_id, child] of test.children) {
for (const [ChildId, child] of test.children) {
if (testsVisited.get(child) == undefined) {
test.children.delete(child_id);
test.children.delete(ChildId);
}
}
}
}
}

export async function rebuildTests(controller: vscode.TestController) {
let tests = await getMesonTests(workspaceState.get<string>("mesonbuild.buildDir")!);
const tests = await getMesonTests(workspaceState.get<string>("mesonbuild.buildDir")!);
const testsVisited = addMesonTestsToController(controller, tests);
if (testsVisited != null) {
deleteTestsFromControllerNotVisited(controller, testsVisited);
Expand All @@ -94,20 +94,20 @@ export async function testRunHandler(
run.started(test);
let starttime = Date.now();
let suite = "";
let testcase = "";
let testCase = "";
if (test.children.size > 0) {
suite = `--suite="${test.id}"`;
} else if (test.parent != undefined) {
suite = `--suite="${test.parent.id}"`;
testcase = `"${test.id}"`;
testCase = `"${test.id}"`;
} else {
testcase = `"${test.id}"`;
testCase = `"${test.id}"`;
}

try {
await exec(
extensionConfiguration("mesonPath"),
["test", "-C", buildDir, "--print-errorlog", suite, testcase],
["test", "-C", buildDir, "--print-errorlog", suite, testCase],
extensionConfiguration("testEnvironment"),
);
let duration = Date.now() - starttime;
Expand Down

0 comments on commit 0168c7f

Please sign in to comment.