Skip to content

Tests: Test-PSBuildPester #102

Description

@HeyItsGilbert

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

Activity

  1. added this to the v1.1.0 milestone on May 6, 2026
  2. removed this from the v1.1.0 milestone on May 19, 2026
  3. tablackburn commented on Jul 7, 2026

    @tablackburn
    Contributor

    Decision (2026-07-07): The sub-issue bodies under #17 previously said "use Pester 5 syntax." They have been updated to target Pester 6.0.0, which was released as stable today; Pester 5 simultaneously moved to maintenance mode (critical/security fixes only).

    Rationale and guardrails:

    • Scope: this affects only this repository's own test suite (the framework used to run tests/). The shipped module's compatibility contract — Test-PSBuildPester importing Pester with -MinimumVersion 5.0.0 and the manifest's RequiredModules floor — is unchanged. Consumers on Pester 5 remain fully supported.
    • Pinning: Pester will be pinned to exactly 6.0.0 in requirements.psd1 (not a floating minimum) and bumped deliberately as 6.0.x patches land, since the release is brand new.
    • Syntax: new tests use the classic Should -Be assertion syntax, which is valid in both Pester 5 and 6, rather than the new Should-* assertion family. This keeps every new file trivially backportable to Pester 5.9 if 6.0.0 proves too raw.
    • Tests: Test-PSBuildPester #102 special case: Test-PSBuildPester tests are Pester-testing-Pester, so the inner Invoke-Pester runs in a subprocess and is matrixed across Pester 5.x and 6.x to continuously verify the Pester 5 consumer contract. Details in that issue's body.

    No code has been started yet; this records the targeting decision before work begins on #97 (shared fixture module) and the rest of the batch.


    Generated by Claude Code

  4. added this to the v1.0.0 milestone on Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions