Pester Testing .NET with Copilot Part 3
I've been sharing my experiences writing Pester tests for a PowerShell function that uses the .NET Framework instead of invoking native cmdlets. The process has also involved using GitHub Copilot in VS Code. As you've seen this has been hit and miss. While there were times when Copilot accelerated my scripting, there were times, I needed to step in.
When we left off, I had refactored the function to use private functions that wrapped around the .NET method invocations. You can only Pester test or mock a PowerShell command like a function or cmdlet.
This is where the function stands now after the refactoring.
Want to read the full issue?