Skip to content

Commit

Permalink
feat: update misspelled words (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
yubing744 authored Sep 3, 2022
1 parent ff7c0ef commit 8c8084a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/move-test/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class MoveTestRunner {
this.logger.info('Running tests...');

const collected = new Set<CollectedTest>();
this.collecteTests(request, collected);
this.collectTests(request, collected);

const run = this.ctrl.createTestRun(request);

Expand Down Expand Up @@ -74,22 +74,23 @@ export class MoveTestRunner {
}

// Collect tests
collecteTests(request: vscode.TestRunRequest, collected: Set<CollectedTest>) {
collectTests(request: vscode.TestRunRequest, collected: Set<CollectedTest>) {
if (request.include !== undefined) {
for (const item of request.include) {
this.collecteItem(item, collected);
this.collectItem(item, collected);
}
}
}

collecteItem(item: vscode.TestItem, collected: Set<CollectedTest>) {
// Collect item recursion
collectItem(item: vscode.TestItem, collected: Set<CollectedTest>) {
const moveTest = parseMoveTestId(item.id);

if (moveTest.kind === 'func') {
collected.add({ item: item, explicitlyIncluded: true });
} else {
item.children.forEach((child) => {
this.collecteItem(child, collected);
this.collectItem(child, collected);
});
}
}
Expand Down

0 comments on commit 8c8084a

Please sign in to comment.