fix: improve test explorer active document filtering to exclude childless peers
Fixes #129476
This commit is contained in:
parent
9350fa3c9d
commit
2cb6f27d84
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue