Replies: 1 comment
-
|
You are most likely running into this issue: #1531 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm really new to Powershell and Pester and I'm running into a rather odd problem.
I have a mock for Get-PackageSource and it's behaving a bit weird.
For example
Mock -CommandName 'Get-PackageSource' -MockWith {[ PSCustomObject ]@{
Name = "Name"
ProviderName="Nuget"
IsTrusted=$true
Location="Location"
}}
In my It block when the function I'm testing hits this mock it's throwing an error:
Parameter set cannot be resolved using the specified named parameters. One or more parameters issued cannot be used together or an insufficient number of parameters were provided.
The function call inside my test function is just doing
Get-PackageSource -ErrorAction "SilentlyContinue"
Is my mock somehow expecting named parameters?
Beta Was this translation helpful? Give feedback.
All reactions