From 06e5b902c1a22a7afbe1ee43bedff2509a24a139 Mon Sep 17 00:00:00 2001 From: nohwnd Date: Tue, 30 Jun 2026 21:26:02 +0200 Subject: [PATCH 1/2] Show real sub-collection matching in Should-ContainCollection release notes Should-ContainCollection now matches an ordered sub-collection (gaps allowed) as of #2820, but the 6.0.0 release notes still only showed the single-value case. Update the example and the family table to describe the real behaviour. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/6.0.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/6.0.0.md b/docs/6.0.0.md index 6a9335565..e961bed02 100644 --- a/docs/6.0.0.md +++ b/docs/6.0.0.md @@ -68,7 +68,7 @@ The assertions are grouped by how they treat `$Actual` and `$Expected`: | --- | --- | --- | | **Value – generic** | `Should-Be`, `Should-NotBe`, `Should-BeGreaterThan`, `Should-BeSame`, `Should-BeNull`, `Should-HaveType` | A single value, compared like the PowerShell operators (`Should-Be` ≈ `-eq`). | | **Value – type specific** | `Should-BeString`, `Should-MatchString`/`Should-BeLikeString`, `Should-BeTrue`/`Should-BeFalse`, `Should-BeFalsy`/`Should-BeTruthy`, `Should-BeBefore`/`Should-BeAfter`, `Should-BeFasterThan`/`Should-BeSlowerThan` | A value of a known type, with type-specific options. | -| **Collection – generic** | `Should-BeCollection`, `Should-ContainCollection`, `Should-NotContainCollection` | Comparing whole collections item by item. | +| **Collection – generic** | `Should-BeCollection`, `Should-ContainCollection`, `Should-NotContainCollection` | Comparing a whole collection item by item, or finding an ordered sub-collection within one. | | **Collection – combinator** | `Should-All`, `Should-Any` | Asserting a condition across every / any item. | There are also dedicated assertions for exceptions (`Should-Throw`), mocks (`Should-Invoke`, @@ -134,7 +134,7 @@ $result.Error | Should-BeNull 1, 2, 3 | Should-BeCollection -Count 3 1, 2, 3 | Should-All { $_ -gt 0 } 1, 2, 3 | Should-Any { $_ -gt 2 } -@('a', 'b', 'c') | Should-ContainCollection 'b' +@('a', 'b', 'c') | Should-ContainCollection @('a', 'c') # ordered sub-collection, gaps allowed # Exceptions { throw 'kaboom' } | Should-Throw -ExceptionMessage 'kaboom' From d0fd126cd2f72bd7b7007d273d21baa469d44450 Mon Sep 17 00:00:00 2001 From: nohwnd Date: Tue, 30 Jun 2026 21:26:02 +0200 Subject: [PATCH 2/2] Bump prerelease to rc4 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/Pester.psd1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Pester.psd1 b/src/Pester.psd1 index 12e52f196..49023b5e4 100644 --- a/src/Pester.psd1 +++ b/src/Pester.psd1 @@ -169,10 +169,10 @@ LicenseUri = "https://www.apache.org/licenses/LICENSE-2.0.html" # Release notes for this particular version of the module - ReleaseNotes = 'https://github.com/pester/Pester/releases/tag/6.0.0-rc3' + ReleaseNotes = 'https://github.com/pester/Pester/releases/tag/6.0.0-rc4' # Prerelease string of this module - Prerelease = 'rc3' + Prerelease = 'rc4' } # Minimum assembly version required