The mistakes listed in #2996 all fail the same way. You get $null, or a mock that did not apply, and nothing tells you which of the rules you broke. These are error message changes, no new API and no design decision:
Mock Get-Internal where the command is not visible from the test scope but does exist in a loaded module. Say so, name the module, suggest -ModuleName.
- a variable is
$null inside InModuleScope while a variable of the same name exists in the enclosing scope. Mention -Parameters.
-ForEach is null or empty and the value came from a BeforeAll variable. Point at BeforeDiscovery. FailOnNullOrEmptyForEach already gives us the hook, only the message needs to know more.
- Pester 3 is loaded and the file uses v5 syntax. Say that, instead of failing on
BeforeAll not being recognized.
None of these need anyone to agree on a design first, and I think they would remove more questions than anything else on the list.
Part of #2996.
🤖
The mistakes listed in #2996 all fail the same way. You get
$null, or a mock that did not apply, and nothing tells you which of the rules you broke. These are error message changes, no new API and no design decision:Mock Get-Internalwhere the command is not visible from the test scope but does exist in a loaded module. Say so, name the module, suggest-ModuleName.$nullinsideInModuleScopewhile a variable of the same name exists in the enclosing scope. Mention-Parameters.-ForEachis null or empty and the value came from aBeforeAllvariable. Point atBeforeDiscovery.FailOnNullOrEmptyForEachalready gives us the hook, only the message needs to know more.BeforeAllnot being recognized.None of these need anyone to agree on a design first, and I think they would remove more questions than anything else on the list.
Part of #2996.
🤖