From 4fe098823433f36e870d13af2ca54cc5c1d4b684 Mon Sep 17 00:00:00 2001 From: Jakub Jares Date: Wed, 17 Jun 2026 15:23:56 +0200 Subject: [PATCH] Fix #2702: Remove unused Get-ScriptBlockScope function Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/functions/Pester.Scoping.ps1 | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/functions/Pester.Scoping.ps1 b/src/functions/Pester.Scoping.ps1 index 36fafde87..4f22ad2d8 100644 --- a/src/functions/Pester.Scoping.ps1 +++ b/src/functions/Pester.Scoping.ps1 @@ -46,18 +46,3 @@ Set-ScriptBlockHint -ScriptBlock $ScriptBlock } } - -function Get-ScriptBlockScope { - [CmdletBinding()] - param ( - [Parameter(Mandatory = $true)] - [scriptblock] - $ScriptBlock - ) - - $sessionStateInternal = $script:ScriptBlockSessionStateInternalProperty.GetValue($ScriptBlock, $null) - if ($PesterPreference.Debug.WriteDebugMessages.Value) { - Write-PesterDebugMessage -Scope SessionState "Getting scope from ScriptBlock '$($sessionStateInternal.Hint)'" - } - $sessionStateInternal -}