Former Microsoft Azure MVP,
Co-organizers of the French PowerShell & DevOps UG .
Find me on https://github.com/omiossec or https://www.linkedin.com/in/omiossec/
Living in Amsterdam, NL
Hi, thanks for the answer. Tried like you said but doesn't work. Finally I have found that the problem was the -ParameterFilter. Doing $Identity.toString() -eq "testList" it works perfectly. That .toString() makes the difference!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I plan to write a post about mocking in Pester
You should try to do somehitng like that
Mock Get-PnPList -MockWith {
[pscustomobject]@{
"Title" = "testList"
}
} -ParameterFilter { $Identity -eq "testList" }
Hi, thanks for the answer. Tried like you said but doesn't work. Finally I have found that the problem was the -ParameterFilter. Doing $Identity.toString() -eq "testList" it works perfectly. That .toString() makes the difference!