Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Draft] Use VSCode test system #353

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove deprecated code
  • Loading branch information
GeorchW committed Feb 23, 2022
commit 6061afde41bac66085e64b376fb7d6233ad53fc2
6 changes: 3 additions & 3 deletions src/buildTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export function buildTree(parsedNames: IParsedName[]): ITestTreeNode {
for (let i = 0; i < parsedName.segments.length - 1; i++) {
const segment = parsedName.segments[i];

const part = parsedName.fullName.substr(segment.start, segment.end - segment.start);
const fullName = parsedName.fullName.substr(0, segment.end);
const part = parsedName.fullName.slice(segment.start, segment.end);
const fullName = parsedName.fullName.slice(0, segment.end);
if (!currentNode.subTrees.has(part)) {
const newTree: ITestTreeNode = {
fullName,
Expand All @@ -36,7 +36,7 @@ export function buildTree(parsedNames: IParsedName[]): ITestTreeNode {
}

const lastSegment = parsedName.segments[parsedName.segments.length - 1];
const testName = parsedName.fullName.substr(lastSegment.start, lastSegment.end - lastSegment.start);
const testName = parsedName.fullName.slice(lastSegment.start, lastSegment.end);
currentNode.tests.push(testName);
}
return root;
Expand Down