Skip to content

Commit

Permalink
fix: improve test explorer active document filtering to exclude child…
Browse files Browse the repository at this point in the history
…less peers

Fixes #129476
  • Loading branch information
connor4312 committed Aug 2, 2021
1 parent 9350fa3 commit 2cb6f27
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -748,14 +748,17 @@ const hasNodeInOrParentOfUri = (collection: IMainThreadTestCollection, testUri:
continue;
}

if (!node.item.uri) {
queue.push(node.children);
if (!node.item.uri || !extpath.isEqualOrParent(fsPath, node.item.uri.fsPath)) {
continue;
}

if (extpath.isEqualOrParent(fsPath, node.item.uri.fsPath)) {
// Only show nodes that can be expanded (and might have a child with
// a range) or ones that have a physical location.
if (node.item.range || node.expand === TestItemExpandState.Expandable) {
return true;
}

queue.push(node.children);
}
}

Expand Down

0 comments on commit 2cb6f27

Please sign in to comment.