Checklist
What is the issue?
When Discovery fails in a container after a valid test:
- The blocks and tests up until the error is executed. Is this expected?
- The block containing the discovery error is considered Passed
- The container is reported as Passed even though it's listed under FailedContainers
The run is still reported as Failed and the error code returned from Invoke-Pester will be non-zero due to the failed container (set to 1 in repro).
Expected Behavior
Is this expected behavior?
Should Container and block be successful when only partly discovered?
Steps To Reproduce
$sb = {
Describe "d" {
It '1' {}
throw 'omg'
}
}
$container = New-PesterContainer -ScriptBlock $sb
$r = Invoke-Pester -Container $container -PassThru
Describe your environment
Pester version : 6.0.0-alpha4 /workspaces/Pester/bin/Pester.psm1
PowerShell version : 7.4.1
OS version : Unix 5.15.153.1
Possible Solution?
No response
Checklist
What is the issue?
When Discovery fails in a container after a valid test:
The run is still reported as Failed and the error code returned from
Invoke-Pesterwill be non-zero due to the failed container (set to 1 in repro).Expected Behavior
Is this expected behavior?
Should Container and block be successful when only partly discovered?
Steps To Reproduce
Describe your environment
Pester version : 6.0.0-alpha4 /workspaces/Pester/bin/Pester.psm1
PowerShell version : 7.4.1
OS version : Unix 5.15.153.1
Possible Solution?
No response