Skip to content

Document 6.1.0 features and drop removed Run.BeforeContainer - #440

Merged
nohwnd merged 3 commits into
mainfrom
nohwnd-docs-6.1.0
Aug 11, 2026
Merged

Document 6.1.0 features and drop removed Run.BeforeContainer#440
nohwnd merged 3 commits into
mainfrom
nohwnd-docs-6.1.0

Conversation

@nohwnd

@nohwnd nohwnd commented Aug 11, 2026

Copy link
Copy Markdown
Member

Docs for what 6.1.0 ships, plus two places where the docs no longer match the code.

New pages:

  • Writing your own assertions (v6) for New-ShouldAssertion: the helper object, the message tokens, -As input shapes, the Hint override, and sharing logic between assertions. The v5 Add-ShouldOperator page now points at it, and the Should-* page has a short version with a link.
  • Shuffled test order for Run.Shuffle, Run.ShuffleSeed and the #pester:no-shuffle opt-out, in the same shape as the parallel page.

Added to existing pages:

  • Global mocks (Mock.Global) on the mocking page, under the v6 changes.
  • Output.ShowTags on the output page, with a link from Tags.
  • Should-BeString and Should-NotBeString list -NormalizeLineEnding.

Stale docs fixed:

The command reference is deliberately not regenerated here, that happens after the 6.1.0 release. Until then yarn build reports two broken links to the not-yet-generated New-ShouldAssertion command page. The build passes (onBrokenLinks: warn), and the links resolve once the reference is regenerated.

Verified with yarn build.

🤖

nohwnd added 3 commits August 11, 2026 19:56
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
nohwnd merged commit 73efd1e into main Aug 11, 2026
4 checks passed
@nohwnd
nohwnd deleted the nohwnd-docs-6.1.0 branch August 11, 2026 18:18
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.

🤖
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove references to Run.BeforeContainer option

1 participant