[lang-ref] ( get_caller_function_name ) ( powershell )
It 'should get caller function name' {
# Get-PSCallStack
function Get-CallerFunctionName {
(Get-PSCallStack)[1].Command
}
function Invoke-Caller {
Get-CallerFunctionName
}
Invoke-Caller | Should -Be 'Invoke-Caller'
}