Skip to content

Commit 36ea4c5

Browse files
committed
exclude Pester setup/teardown symbols from search
1 parent bd91831 commit 36ea4c5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/PowerShellEditorServices/Services/Workspace/Handlers/WorkspaceSymbolsHandler.cs

+7
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ public override async Task<Container<SymbolInformation>> Handle(WorkspaceSymbolP
5656
continue;
5757
}
5858

59+
// Exclude Pester setup/teardown symbols as they're unnamed
60+
if (foundOccurrence is PesterSymbolReference pesterSymbol &&
61+
!PesterSymbolReference.IsPesterTestCommand(pesterSymbol.Command))
62+
{
63+
continue;
64+
}
65+
5966
Location location = new()
6067
{
6168
Uri = DocumentUri.From(foundOccurrence.FilePath),

0 commit comments

Comments
 (0)