Document 6.1.0 features and drop removed Run.BeforeContainer - #440
Merged
Conversation
Adds the pages and sections for what 6.1.0 ships: - New "Writing your own assertions (v6)" page for New-ShouldAssertion, and a short version of it on the Should-* page. The v5 custom assertions page now points at it. - New "Shuffled test order" page for Run.Shuffle, Run.ShuffleSeed and the '#pester:no-shuffle' opt-out. - Global mocks (Mock.Global) on the mocking page. - Output.ShowTags on the output page, linked from Tags. - Should-BeString and Should-NotBeString list -NormalizeLineEnding. Also fixes docs that no longer match the code. Run.BeforeContainer was removed in #2859, so the parallel, result object and v5 to v6 pages now describe only the Pester.BeforeContainer.ps1 convention file. Code coverage is collected in parallel runs since #2860, so it is no longer listed as a reason to fall back to the sequential path. The command reference is not regenerated here, that happens after the 6.1.0 release. Until then the two links to the New-ShouldAssertion command page are reported as broken by the build. Fixes #416 🤖
…a module Should is not an approved verb, so a module that exports Should-* functions makes Import-Module warn every consumer. A manifest with explicit FunctionsToExport does not suppress it, and -DisableNameChecking only moves the problem to the user. Name the function Assert-Something and export a Should-Something alias instead. Aliases are not verb checked, so the module imports quietly and the assertion is still called by the name that reads like an assertion. Nothing in Pester keys off the command name, so it behaves the same through the alias. Also notes why Pester itself does not warn (it adds Should to the verb list from its own assembly, which a script module cannot do), and switches the first example to a .ps1 so it does not show the shape that warns. 🤖
Say in the admonition that we want Mock.Global to become the default in v7 and that the v6 feedback decides it, that we expect it to change nothing for most suites, and ask for a report either way. 🤖
nohwnd
added a commit
that referenced
this pull request
Aug 11, 2026
* Update generated docs to 6.1.0 Regenerated the command reference and the configuration table against Pester 6.1.0. Adds the New-ShouldAssertion page, which also clears the two broken links that #440 left behind. Picks up -NormalizeLineEnding on Should-BeString and Should-NotBeString, the Should-Throw wildcard hint, and in the configuration table Run.Shuffle, Run.ShuffleSeed, Output.ShowTags and Mock.Global. Drops the removed Run.BeforeContainer row. Generated with -DocusaurusVersion 1.0.37. Alt3.Docusaurus.PowerShell 2.0.0 is out now, and the unpinned script picks it up and then fails on a YamlDotNet assembly conflict with PlatyPS, so it needs pinning until #418 lands. 🤖 * Update generated v5 docs to 5.9.1 The v5 command reference and configuration section were still generated from 5.8.0. 5.9.1 changed no help text, so this is only the version stamp, but it keeps the versioned docs honest about which release they describe. 🤖
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Docs for what 6.1.0 ships, plus two places where the docs no longer match the code.
New pages:
New-ShouldAssertion: the helper object, the message tokens,-Asinput shapes, theHintoverride, and sharing logic between assertions. The v5Add-ShouldOperatorpage now points at it, and theShould-*page has a short version with a link.Run.Shuffle,Run.ShuffleSeedand the#pester:no-shuffleopt-out, in the same shape as the parallel page.Added to existing pages:
Mock.Global) on the mocking page, under the v6 changes.Output.ShowTagson the output page, with a link from Tags.Should-BeStringandShould-NotBeStringlist-NormalizeLineEnding.Stale docs fixed:
Run.BeforeContainerwas removed in Drop Run.BeforeContainer option, keep the Pester.BeforeContainer.ps1 convention Pester#2859. The parallel, result object and v5 to v6 pages described it as a working option. They now describe only thePester.BeforeContainer.ps1convention file. Fixes Remove references to Run.BeforeContainer option #416CodeCoverageas a reason to fall back to the sequential path, and had a follow-up note saying coverage falls back. Replaced with a short "Code coverage" section.The command reference is deliberately not regenerated here, that happens after the 6.1.0 release. Until then
yarn buildreports two broken links to the not-yet-generatedNew-ShouldAssertioncommand page. The build passes (onBrokenLinks: warn), and the links resolve once the reference is regenerated.Verified with
yarn build.🤖