Add Pester 6 integration tests for Test-PSBuildPester.
Scenarios to cover:
Scope note: the block/container-failure scenario fails against current code — Test-PSBuildPester.ps1 gates only on FailedCount. The fix (include FailedBlocksCount and FailedContainersCount in the gate, mirroring #128's change to the repo's own psakeFile.ps1) is in scope for the same PR as these tests, so the PR merges green. If #128 is extended to cover the shipped function first, this PR only contributes the regression test.
Implementation note: these tests are Pester-testing-Pester, and two Pester versions cannot coexist in one session. Run the inner Invoke-Pester in a subprocess (Start-Job, as tests/build.tests.ps1 already does) so the inner Pester version is independent of the outer test framework. Then parameterize the inner run across both Pester 5.x and 6.x — the shipped function keeps supporting Pester 5 consumers, and this matrix is what verifies that contract.
Target Pester 6.0.0 (outer framework) with classic Should syntax — see notes on #17. Parent issue: #17
Add Pester 6 integration tests for
Test-PSBuildPester.Scenarios to cover:
BeforeAll/AfterAllblocks and container/discovery errors also fail the build, not just failedIttests (see Also fail on Pester block/container failures (not just failed tests) #128)Scope note: the block/container-failure scenario fails against current code —
Test-PSBuildPester.ps1gates only onFailedCount. The fix (includeFailedBlocksCountandFailedContainersCountin the gate, mirroring #128's change to the repo's ownpsakeFile.ps1) is in scope for the same PR as these tests, so the PR merges green. If #128 is extended to cover the shipped function first, this PR only contributes the regression test.Implementation note: these tests are Pester-testing-Pester, and two Pester versions cannot coexist in one session. Run the inner
Invoke-Pesterin a subprocess (Start-Job, astests/build.tests.ps1already does) so the inner Pester version is independent of the outer test framework. Then parameterize the inner run across both Pester 5.x and 6.x — the shipped function keeps supporting Pester 5 consumers, and this matrix is what verifies that contract.Target Pester 6.0.0 (outer framework) with classic
Shouldsyntax — see notes on #17. Parent issue: #17