Pester
Pester copied to clipboard
Pester is the ubiquitous test and mock framework for PowerShell.
Windows Server 2012/2012R2 will be end of life October 10, 2023. From that point on only PowerShell v5.1 and later is supported by Microsoft and we should consider dropping support...
### Checklist - [X] Feature request has a meaningful title - [X] I have searched the existing issues. See [all issues](https://github.com/pester/Pester/issues?q=is%3Aissue) - [X] I have tested using the latest version...
## General summary of the issue A different message is displayed for `Should -Not -Invoke` and `Should -Invoke -Time 0 -Exactly`. The message `Expected Test-Me not to be called exactly...
### Checklist - [X] Issue has a meaningful title - [X] I have searched the existing issues. See [all issues](https://github.com/pester/Pester/issues?q=is%3Aissue) - [X] I have tested using the latest version of...
... or -CallingModule, etc. The name "-Module" suggests that Mock needs to know which module is providing the function to be mocked, not which calling module needs to have the...
## General summary of the issue Pester is placing mock inside of module scope even when ```-ModuleName``` isn't specified. Diagnostic output incorrectly assets that ModuleName _was_ specified. ## Describe your...
## Problem Description I would like to be able to test code from within a `Invoke-Command` that has `$using:` statements like so: ```powershell $A = 1 $B = 1 Invoke-Command...
## General summary of the issue Hello, im writing a DSC class based module. Within the PSM1 file, but outside the class definition i have defined a function. Im trying...
## 1. General summary of the issue I couldn't really find an example in the [docs](https://pester.dev/docs/commands/Mock#syntax) so I'll ask my question here. In the code below it is asserted if...
Powershell 7 used. I have a module that uses a lot of classes, some of them are static classes. I'm looking for some documentation on how best to mock these...