Mocking Exceptions in Pester
Hello! So if you know me you know I like testing, and that when it comes to testing in PowerShell the de-facto testing framework to use is Pester. And it’s claim that it is ubiquitous can be backed-up by the fact that it is now packaged in PowerShell. One of the great things about Pester is that you can mock a function; that is, if you call a function within another function you can mock the internal funciton.