Open papadeltasierra opened 1 month ago
Thanks for the detailed report. I'm unable to reproduce the error. Did you try it in a fresh session and/or another machine? Which module and version did you use Get-AzureEnvironment
from? I tested using module Azure v5.3.1.
Checklist
What is the issue?
Ref: https://github.com/pester/Pester/issues/1819 See my code below. The second
Assert-MockCalled
fails. This feels like the same bug as referenced above. Question:/ Should I be able to trace the parameter name in the Mock in the manner that I have done?$Name
seems to be set to the value of theIt
block i.e.Debugging
and if I change my Assert to check for$Name
equal toDebugging
then the Assert erroneously passes.Expected Behavior
I expect this test to pass.
Steps To Reproduce
Describe your environment
Pester version : 5.6.1 C:\Users\pauldsmith\OneDrive - Microsoft\Documents\PowerShell\Modules\Pester\5.6.1\Pester.psm1 PowerShell version : 7.4.4 OS version : Microsoft Windows NT 10.0.22631.0
Possible Solution?
Possibly similar fix to the referenced issue?