From 277a37a8ba4176a83843052f02b736cecfe4e5d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Jare=C5=A1?= Date: Tue, 11 Aug 2026 20:39:02 +0200 Subject: [PATCH 1/2] Update generated docs to 6.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. 🤖 --- docs/commands/Add-ShouldOperator.mdx | 2 +- docs/commands/AfterAll.mdx | 2 +- docs/commands/AfterEach.mdx | 2 +- docs/commands/BeforeAll.mdx | 2 +- docs/commands/BeforeDiscovery.mdx | 2 +- docs/commands/BeforeEach.mdx | 2 +- docs/commands/Context.mdx | 2 +- docs/commands/ConvertTo-JUnitReport.mdx | 2 +- docs/commands/ConvertTo-NUnitReport.mdx | 2 +- docs/commands/ConvertTo-Pester4Result.mdx | 2 +- docs/commands/Describe.mdx | 2 +- docs/commands/Export-JUnitReport.mdx | 2 +- docs/commands/Export-NUnitReport.mdx | 2 +- docs/commands/Get-ShouldOperator.mdx | 2 +- docs/commands/InModuleScope.mdx | 2 +- docs/commands/Invoke-Pester.mdx | 2 +- docs/commands/It.mdx | 2 +- docs/commands/Mock.mdx | 43 +++- docs/commands/New-Fixture.mdx | 2 +- docs/commands/New-MockObject.mdx | 2 +- docs/commands/New-PesterConfiguration.mdx | 2 +- docs/commands/New-PesterContainer.mdx | 2 +- docs/commands/New-ShouldAssertion.mdx | 231 ++++++++++++++++++ docs/commands/Set-ItResult.mdx | 2 +- docs/commands/Should-All.mdx | 2 +- docs/commands/Should-Any.mdx | 2 +- docs/commands/Should-Be.mdx | 2 +- docs/commands/Should-BeAfter.mdx | 4 +- docs/commands/Should-BeBefore.mdx | 4 +- docs/commands/Should-BeCollection.mdx | 2 +- docs/commands/Should-BeEmptyString.mdx | 2 +- docs/commands/Should-BeEquivalent.mdx | 2 +- docs/commands/Should-BeFalse.mdx | 6 +- docs/commands/Should-BeFalsy.mdx | 6 +- docs/commands/Should-BeFasterThan.mdx | 6 +- docs/commands/Should-BeGreaterThan.mdx | 2 +- docs/commands/Should-BeGreaterThanOrEqual.mdx | 2 +- docs/commands/Should-BeHashtable.mdx | 4 +- docs/commands/Should-BeLessThan.mdx | 2 +- docs/commands/Should-BeLessThanOrEqual.mdx | 2 +- docs/commands/Should-BeLikeString.mdx | 2 +- docs/commands/Should-BeNull.mdx | 4 +- docs/commands/Should-BeSame.mdx | 2 +- docs/commands/Should-BeSlowerThan.mdx | 6 +- docs/commands/Should-BeString.mdx | 30 ++- docs/commands/Should-BeTrue.mdx | 6 +- docs/commands/Should-BeTruthy.mdx | 6 +- docs/commands/Should-ContainCollection.mdx | 36 ++- docs/commands/Should-HaveParameter.mdx | 2 +- docs/commands/Should-HaveType.mdx | 19 +- docs/commands/Should-Invoke.mdx | 2 +- docs/commands/Should-MatchString.mdx | 2 +- docs/commands/Should-NotBe.mdx | 2 +- docs/commands/Should-NotBeEmptyString.mdx | 2 +- docs/commands/Should-NotBeLikeString.mdx | 2 +- docs/commands/Should-NotBeNull.mdx | 4 +- docs/commands/Should-NotBeSame.mdx | 2 +- docs/commands/Should-NotBeString.mdx | 42 +++- .../commands/Should-NotBeWhiteSpaceString.mdx | 2 +- docs/commands/Should-NotContainCollection.mdx | 2 +- docs/commands/Should-NotHaveParameter.mdx | 2 +- docs/commands/Should-NotHaveType.mdx | 9 +- docs/commands/Should-NotInvoke.mdx | 2 +- docs/commands/Should-NotMatchString.mdx | 2 +- docs/commands/Should-Throw.mdx | 6 +- docs/commands/Should.mdx | 2 +- docs/commands/docusaurus.sidebar.js | 1 + docs/usage/configuration.mdx | 19 +- 68 files changed, 489 insertions(+), 97 deletions(-) create mode 100644 docs/commands/New-ShouldAssertion.mdx diff --git a/docs/commands/Add-ShouldOperator.mdx b/docs/commands/Add-ShouldOperator.mdx index 8548e00d..6a1013b4 100644 --- a/docs/commands/Add-ShouldOperator.mdx +++ b/docs/commands/Add-ShouldOperator.mdx @@ -166,4 +166,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/AfterAll.mdx b/docs/commands/AfterAll.mdx index 9b4dff22..78995da1 100644 --- a/docs/commands/AfterAll.mdx +++ b/docs/commands/AfterAll.mdx @@ -107,4 +107,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/AfterEach.mdx b/docs/commands/AfterEach.mdx index b1e89855..5fa59d13 100644 --- a/docs/commands/AfterEach.mdx +++ b/docs/commands/AfterEach.mdx @@ -104,4 +104,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/BeforeAll.mdx b/docs/commands/BeforeAll.mdx index b92b32c1..10f57906 100644 --- a/docs/commands/BeforeAll.mdx +++ b/docs/commands/BeforeAll.mdx @@ -116,4 +116,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/BeforeDiscovery.mdx b/docs/commands/BeforeDiscovery.mdx index 9da8056b..435df71f 100644 --- a/docs/commands/BeforeDiscovery.mdx +++ b/docs/commands/BeforeDiscovery.mdx @@ -94,4 +94,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/BeforeEach.mdx b/docs/commands/BeforeEach.mdx index a2f7f02e..9bb10f5d 100644 --- a/docs/commands/BeforeEach.mdx +++ b/docs/commands/BeforeEach.mdx @@ -101,4 +101,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Context.mdx b/docs/commands/Context.mdx index 11bb5b04..8b422c58 100644 --- a/docs/commands/Context.mdx +++ b/docs/commands/Context.mdx @@ -200,4 +200,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/ConvertTo-JUnitReport.mdx b/docs/commands/ConvertTo-JUnitReport.mdx index 5feff896..1beadabb 100644 --- a/docs/commands/ConvertTo-JUnitReport.mdx +++ b/docs/commands/ConvertTo-JUnitReport.mdx @@ -121,4 +121,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/ConvertTo-NUnitReport.mdx b/docs/commands/ConvertTo-NUnitReport.mdx index 31a0d9c9..8e920410 100644 --- a/docs/commands/ConvertTo-NUnitReport.mdx +++ b/docs/commands/ConvertTo-NUnitReport.mdx @@ -148,4 +148,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/ConvertTo-Pester4Result.mdx b/docs/commands/ConvertTo-Pester4Result.mdx index 2fcdcd98..17a4ec93 100644 --- a/docs/commands/ConvertTo-Pester4Result.mdx +++ b/docs/commands/ConvertTo-Pester4Result.mdx @@ -86,4 +86,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Describe.mdx b/docs/commands/Describe.mdx index 51ebcfaa..7d1b18c4 100644 --- a/docs/commands/Describe.mdx +++ b/docs/commands/Describe.mdx @@ -210,4 +210,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Export-JUnitReport.mdx b/docs/commands/Export-JUnitReport.mdx index df9e3822..ca8925c4 100644 --- a/docs/commands/Export-JUnitReport.mdx +++ b/docs/commands/Export-JUnitReport.mdx @@ -105,4 +105,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Export-NUnitReport.mdx b/docs/commands/Export-NUnitReport.mdx index 455bfdd4..2a894ae6 100644 --- a/docs/commands/Export-NUnitReport.mdx +++ b/docs/commands/Export-NUnitReport.mdx @@ -121,4 +121,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Get-ShouldOperator.mdx b/docs/commands/Get-ShouldOperator.mdx index 1e89c917..cbe3a8f2 100644 --- a/docs/commands/Get-ShouldOperator.mdx +++ b/docs/commands/Get-ShouldOperator.mdx @@ -94,4 +94,4 @@ standard PowerShell discovery patterns (like `Get-Help Should -Parameter *`). ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/InModuleScope.mdx b/docs/commands/InModuleScope.mdx index 3d745a78..d13a91ed 100644 --- a/docs/commands/InModuleScope.mdx +++ b/docs/commands/InModuleScope.mdx @@ -206,4 +206,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Invoke-Pester.mdx b/docs/commands/Invoke-Pester.mdx index f6a50027..7ae171d6 100644 --- a/docs/commands/Invoke-Pester.mdx +++ b/docs/commands/Invoke-Pester.mdx @@ -330,4 +330,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/It.mdx b/docs/commands/It.mdx index 0c39ed4e..19569962 100644 --- a/docs/commands/It.mdx +++ b/docs/commands/It.mdx @@ -253,4 +253,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Mock.mdx b/docs/commands/Mock.mdx index d374d3a9..f8bc2b90 100644 --- a/docs/commands/Mock.mdx +++ b/docs/commands/Mock.mdx @@ -183,6 +183,38 @@ Describe "ModuleMockExample" { This example shows how calls to commands made from inside a module can be mocked by using the -ModuleName parameter. +### EXAMPLE 10 + +```powershell +Describe "Get-Date wrapper" { + BeforeAll { + # Capture the original command before it is mocked, so it can be + # called from inside the mock. Use -CommandType Function, Cmdlet or + # Application to match how the original command is implemented. + $originalGetDate = Get-Command Get-Date -CommandType Cmdlet + } + + It "prefixes the original date output" { + Mock Get-Date { + # Invoke the original command, forwarding the bound parameters + # that were passed to the mocked command. + $date = & $originalGetDate @PesterBoundParameters + "DATE: $date" + } + + Get-Date -Date '2000-01-01' -Format 'yyyy-MM-dd' | Should -Be 'DATE: 2000-01-01' + } +} +``` + +Sometimes you want to mock a command but still run the original +implementation, for example to wrap or inspect its output. +Capture the +original command with Get-Command in a BeforeAll before the mock is defined, +then invoke it inside the MockWith script block using the call operator (&). +Forward the caller's arguments with @PesterBoundParameters, a hashtable of +the parameters that were bound on the mocked command. + ## PARAMETERS ### -CommandName @@ -209,6 +241,11 @@ NOTE: Do not specify param or dynamicparam blocks in this script block. These will be injected automatically based on the signature of the command being mocked, and the MockWith script block can contain references to the mocked commands parameter variables. +The parameters bound on the mocked +command are also available as a hashtable in the $PesterBoundParameters +variable, which is convenient for forwarding them to another command. +See +the examples for calling the original command from inside the mock. ```yaml Type: ScriptBlock @@ -267,6 +304,10 @@ is to be mocked. This should be a module that _calls_ the mocked command; it doesn't necessarily have to be the same module which originally implemented the command. +When the experimental Mock.Global +configuration option is enabled this parameter is used only as a hint to +resolve the command (for example to find a module-private command), not +to scope where the mock applies. ```yaml Type: String @@ -338,4 +379,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/New-Fixture.mdx b/docs/commands/New-Fixture.mdx index 02de35bb..a35e6634 100644 --- a/docs/commands/New-Fixture.mdx +++ b/docs/commands/New-Fixture.mdx @@ -144,4 +144,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/New-MockObject.mdx b/docs/commands/New-MockObject.mdx index 49fafb69..9bed3e4d 100644 --- a/docs/commands/New-MockObject.mdx +++ b/docs/commands/New-MockObject.mdx @@ -210,4 +210,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/New-PesterConfiguration.mdx b/docs/commands/New-PesterConfiguration.mdx index dae3d2c5..cac5ef76 100644 --- a/docs/commands/New-PesterConfiguration.mdx +++ b/docs/commands/New-PesterConfiguration.mdx @@ -121,4 +121,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/New-PesterContainer.mdx b/docs/commands/New-PesterContainer.mdx index e73b380f..113a26c1 100644 --- a/docs/commands/New-PesterContainer.mdx +++ b/docs/commands/New-PesterContainer.mdx @@ -154,4 +154,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/New-ShouldAssertion.mdx b/docs/commands/New-ShouldAssertion.mdx new file mode 100644 index 00000000..f016527a --- /dev/null +++ b/docs/commands/New-ShouldAssertion.mdx @@ -0,0 +1,231 @@ +--- +id: New-ShouldAssertion +title: New-ShouldAssertion +description: Help page for the PowerShell Pester "New-ShouldAssertion" command +keywords: + - PowerShell + - Pester + - Help + - Documentation +hide_title: false +hide_table_of_contents: false +custom_edit_url: null +--- + +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + +## SYNOPSIS + +Creates the assertion helper object used to author custom `Should-*` assertions. + +## SYNTAX + +```powershell +New-ShouldAssertion [-Caller] [[-Actual] ] [[-Buffer] ] [-As ] + [] +``` + +## DESCRIPTION + +`New-ShouldAssertion` returns a small helper object (conventionally stored in `$assert`) +that gives a custom assertion the same building blocks the built-in `Should-*` assertions +use: pipeline input collection, consistent value formatting, diagnostic input hints, and +the shared failure path that powers soft assertions. + +Call it once at the top of your assertion, passing the assertion's own `$PSCmdlet`, its +`-Actual` value and `$Input`, then use the returned object's methods: + +- `Actual()` returns the value to assert on, collected from either the pipeline or the + `-Actual` parameter. +The `-As` parameter (`Scalar` (default), `ExactType`, `Collection` + or `CollectionItems`) selects both unrolling and the wording of the input hint. +- `Fail(message [, data])` reports a failure. +`message` may contain ``, + ``, ``, ``, `` and any `` present in + `data`. +`data` is a hashtable whose `Expected`, `Actual`, `Because` and `Hint` entries + are treated specially; all other entries become message tokens. +`Hint` overrides the + default input hint with your own text, appended as `Hint: `. +Whether this throws + immediately or records the failure and continues (a soft assertion) is decided by the + caller's `-ErrorAction` or the `Should.ErrorAction` configuration, exactly like the + built-in assertions. +- `Hint()` returns the diagnostic input hint (or `$null`), for assertions that need to + inspect it before deciding how to fail. +- `Format(value)` formats a value the same way Pester does in assertion messages. +- `EnsureScalar(expected)` returns `expected` unchanged, or throws when it is a collection, + guarding assertions that only make sense against a single value. +- `IsCollection(value)` returns whether a value is treated as a collection. + +A passing result is implicit: an assertion passes simply by returning without calling `Fail()`. +There is nothing to call at the end, and custom assertions still work inside a mock +`-ParameterFilter` automatically. + +## EXAMPLES + +### EXAMPLE 1 + +```powershell +function Should-BeAwesome { + [CmdletBinding()] + param ( + [Parameter(ValueFromPipeline)] $Actual, + [Parameter(Position = 0)] $Expected = 'Awesome', + [string] $Because + ) + end { + $assert = New-ShouldAssertion -Caller $PSCmdlet -Actual $Actual -Buffer $Input + $Actual = $assert.Actual() + + if ($Actual -ne $Expected) { + $assert.Fail( + 'Expected , but got .', + @{ Expected = $Expected; Because = $Because }) + } + } +} + +'lame' | Should-BeAwesome +``` + +Defines and uses a custom assertion. +Because it goes through the shared failure path, it +supports `-Because`, soft assertions via `-ErrorAction`, and mock parameter filters for free. + +### EXAMPLE 2 + +```powershell +# A shared helper backing several of your own assertions. Thread the calling assertion's own +# $PSCmdlet and $Input into New-ShouldAssertion so pipeline detection, the input hint and the +# soft/hard -ErrorAction decision all resolve against the real assertion -- no matter how many +# wrapper layers sit in between. +function Invoke-MyEquals { + param ([System.Management.Automation.PSCmdlet] $Cmdlet, $Actual, $Buffer, $Expected) + +$assert = New-ShouldAssertion -Caller $Cmdlet -Actual $Actual -Buffer $Buffer + $value = $assert.Actual() + if ($value -ne $Expected) { + $assert.Fail('Expected but got .', @{ Expected = $Expected }) + } +} + +function Should-Equal { + [CmdletBinding()] + param ([Parameter(ValueFromPipeline)] $Actual, [Parameter(Position = 0)] $Expected) + end { Invoke-MyEquals -Cmdlet $PSCmdlet -Actual $Actual -Buffer $Input -Expected $Expected } +} +``` + +Factors common assertion logic into one helper reused by several `Should-*` assertions. +Nothing +keys off the assertion's *name*, so the helper does not need to know which assertion called it; +everything keys off the single `$PSCmdlet` you pass as `-Caller`. +Passing the user-facing +assertion's `$PSCmdlet` and `$Input` down keeps the input hint, pipeline detection and +`-ErrorAction` behaviour identical to an unwrapped assertion, at any wrapping depth. + +## PARAMETERS + +### -Caller + +The `$PSCmdlet` of the assertion function. +Used to reach the caller's session state (so +soft assertions and the mock parameter filter behave correctly) and to recover the +original pipeline input for hints. + +```yaml +Type: PSCmdlet +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Actual + +The assertion's `-Actual` value. +Pass it even when the value usually arrives from the +pipeline; it is `$null` in that case and the pipeline `$Input` is used instead. + +```yaml +Type: Object +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Buffer + +The assertion function's `$Input`. +Holds the values received from the pipeline. +Pass +`$Input` even when the assertion is usually called with `-Actual`; it is empty in that case. + +```yaml +Type: Object[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -As + +How the input is collected: `Scalar` (default) and `ExactType` unroll a single piped value, +`Collection` and `CollectionItems` keep it as a collection. +The value also selects the +wording of the diagnostic hint shown when the assertion fails; use `None` for an assertion +that compares the whole input structurally (like `Should-BeEquivalent`) and so has no +input-shape gotcha to hint about. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: Scalar +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### ShouldAssertion + +## NOTES + +## RELATED LINKS + +[https://pester.dev/docs/commands/New-ShouldAssertion](https://pester.dev/docs/commands/New-ShouldAssertion) + +[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) + +[https://pester.dev/docs/commands/Should-Be](https://pester.dev/docs/commands/Should-Be) + +## VERSION + +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Set-ItResult.mdx b/docs/commands/Set-ItResult.mdx index eaedd122..a658c9d8 100644 --- a/docs/commands/Set-ItResult.mdx +++ b/docs/commands/Set-ItResult.mdx @@ -136,4 +136,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-All.mdx b/docs/commands/Should-All.mdx index c9c8126a..420f9774 100644 --- a/docs/commands/Should-All.mdx +++ b/docs/commands/Should-All.mdx @@ -127,4 +127,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-Any.mdx b/docs/commands/Should-Any.mdx index 6dd665d2..74ed083d 100644 --- a/docs/commands/Should-Any.mdx +++ b/docs/commands/Should-Any.mdx @@ -128,4 +128,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-Be.mdx b/docs/commands/Should-Be.mdx index b7ffb3ac..52edf380 100644 --- a/docs/commands/Should-Be.mdx +++ b/docs/commands/Should-Be.mdx @@ -116,4 +116,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeAfter.mdx b/docs/commands/Should-BeAfter.mdx index 97856468..e3a7b7a4 100644 --- a/docs/commands/Should-BeAfter.mdx +++ b/docs/commands/Should-BeAfter.mdx @@ -97,7 +97,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 3 +Position: 2 Default value: None Accept pipeline input: True (ByValue) Accept wildcard characters: False @@ -227,4 +227,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeBefore.mdx b/docs/commands/Should-BeBefore.mdx index ad383d62..ae115f8a 100644 --- a/docs/commands/Should-BeBefore.mdx +++ b/docs/commands/Should-BeBefore.mdx @@ -97,7 +97,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 3 +Position: 2 Default value: None Accept pipeline input: True (ByValue) Accept wildcard characters: False @@ -227,4 +227,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeCollection.mdx b/docs/commands/Should-BeCollection.mdx index d5b3eac9..3e4117b3 100644 --- a/docs/commands/Should-BeCollection.mdx +++ b/docs/commands/Should-BeCollection.mdx @@ -153,4 +153,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeEmptyString.mdx b/docs/commands/Should-BeEmptyString.mdx index 9a6512ae..f0266446 100644 --- a/docs/commands/Should-BeEmptyString.mdx +++ b/docs/commands/Should-BeEmptyString.mdx @@ -120,4 +120,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeEquivalent.mdx b/docs/commands/Should-BeEquivalent.mdx index 0221f46d..0cf92a39 100644 --- a/docs/commands/Should-BeEquivalent.mdx +++ b/docs/commands/Should-BeEquivalent.mdx @@ -210,4 +210,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeFalse.mdx b/docs/commands/Should-BeFalse.mdx index f5e7b7f9..379e2301 100644 --- a/docs/commands/Should-BeFalse.mdx +++ b/docs/commands/Should-BeFalse.mdx @@ -24,7 +24,7 @@ It does not convert input values to boolean, and will fail for any value that is ## SYNTAX ```powershell -Should-BeFalse [[-Actual] ] [[-Because] ] [] +Should-BeFalse [[-Actual] ] [-Because ] [] ``` ## DESCRIPTION @@ -83,7 +83,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 2 +Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -115,4 +115,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeFalsy.mdx b/docs/commands/Should-BeFalsy.mdx index 3e6dae45..c2f48a29 100644 --- a/docs/commands/Should-BeFalsy.mdx +++ b/docs/commands/Should-BeFalsy.mdx @@ -24,7 +24,7 @@ It converts the input value to a boolean. ## SYNTAX ```powershell -Should-BeFalsy [[-Actual] ] [[-Because] ] [] +Should-BeFalsy [[-Actual] ] [-Because ] [] ``` ## DESCRIPTION @@ -83,7 +83,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 2 +Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -115,4 +115,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeFasterThan.mdx b/docs/commands/Should-BeFasterThan.mdx index e2c4bc98..e6cf5b08 100644 --- a/docs/commands/Should-BeFasterThan.mdx +++ b/docs/commands/Should-BeFasterThan.mdx @@ -23,7 +23,7 @@ Asserts that the provided [timespan] or [scriptblock] is faster than the expecte ## SYNTAX ```powershell -Should-BeFasterThan [[-Actual] ] [[-Expected] ] [-Because ] [] +Should-BeFasterThan [[-Actual] ] [-Expected] [-Because ] [] ``` ## DESCRIPTION @@ -76,7 +76,7 @@ Type: Object Parameter Sets: (All) Aliases: -Required: False +Required: True Position: 1 Default value: None Accept pipeline input: False @@ -125,4 +125,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeGreaterThan.mdx b/docs/commands/Should-BeGreaterThan.mdx index bdddb0a9..c83e2e36 100644 --- a/docs/commands/Should-BeGreaterThan.mdx +++ b/docs/commands/Should-BeGreaterThan.mdx @@ -115,4 +115,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeGreaterThanOrEqual.mdx b/docs/commands/Should-BeGreaterThanOrEqual.mdx index f696c922..4e8d3a75 100644 --- a/docs/commands/Should-BeGreaterThanOrEqual.mdx +++ b/docs/commands/Should-BeGreaterThanOrEqual.mdx @@ -115,4 +115,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeHashtable.mdx b/docs/commands/Should-BeHashtable.mdx index aad1b61c..b19b6d3d 100644 --- a/docs/commands/Should-BeHashtable.mdx +++ b/docs/commands/Should-BeHashtable.mdx @@ -95,7 +95,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 2 +Position: 1 Default value: None Accept pipeline input: True (ByValue) Accept wildcard characters: False @@ -199,4 +199,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeLessThan.mdx b/docs/commands/Should-BeLessThan.mdx index 798945a3..9e1d0038 100644 --- a/docs/commands/Should-BeLessThan.mdx +++ b/docs/commands/Should-BeLessThan.mdx @@ -115,4 +115,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeLessThanOrEqual.mdx b/docs/commands/Should-BeLessThanOrEqual.mdx index 33414ae2..c3e1949f 100644 --- a/docs/commands/Should-BeLessThanOrEqual.mdx +++ b/docs/commands/Should-BeLessThanOrEqual.mdx @@ -125,4 +125,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeLikeString.mdx b/docs/commands/Should-BeLikeString.mdx index 2f1bb714..81e3699d 100644 --- a/docs/commands/Should-BeLikeString.mdx +++ b/docs/commands/Should-BeLikeString.mdx @@ -142,4 +142,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeNull.mdx b/docs/commands/Should-BeNull.mdx index 9f853ac3..0d961a2d 100644 --- a/docs/commands/Should-BeNull.mdx +++ b/docs/commands/Should-BeNull.mdx @@ -53,7 +53,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 2 +Position: 1 Default value: None Accept pipeline input: True (ByValue) Accept wildcard characters: False @@ -99,4 +99,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeSame.mdx b/docs/commands/Should-BeSame.mdx index d341247d..fb5c18ef 100644 --- a/docs/commands/Should-BeSame.mdx +++ b/docs/commands/Should-BeSame.mdx @@ -128,4 +128,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeSlowerThan.mdx b/docs/commands/Should-BeSlowerThan.mdx index d7809030..f7cacfe6 100644 --- a/docs/commands/Should-BeSlowerThan.mdx +++ b/docs/commands/Should-BeSlowerThan.mdx @@ -23,7 +23,7 @@ Asserts that the provided [timespan] is slower than the expected [timespan]. ## SYNTAX ```powershell -Should-BeSlowerThan [[-Actual] ] [[-Expected] ] [-Because ] [] +Should-BeSlowerThan [[-Actual] ] [-Expected] [-Because ] [] ``` ## DESCRIPTION @@ -84,7 +84,7 @@ Type: Object Parameter Sets: (All) Aliases: -Required: False +Required: True Position: 1 Default value: None Accept pipeline input: False @@ -133,4 +133,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeString.mdx b/docs/commands/Should-BeString.mdx index c12baf49..4b2e88e5 100644 --- a/docs/commands/Should-BeString.mdx +++ b/docs/commands/Should-BeString.mdx @@ -24,7 +24,7 @@ Asserts that the actual value is equal to the expected value. ```powershell Should-BeString [[-Actual] ] [-Expected] [-Because ] [-CaseSensitive] - [-IgnoreWhitespace] [-TrimWhitespace] [] + [-IgnoreWhitespace] [-TrimWhitespace] [-NormalizeLineEnding] [] ``` ## DESCRIPTION @@ -50,6 +50,14 @@ This assertion will pass, because the actual value is equal to the expected valu This assertion will fail, because the actual value is not equal to the expected value. +### EXAMPLE 3 + +```powershell +"" | Should-BeString "" +``` + +This assertion will pass, because an empty string is allowed as the expected value. + ## PARAMETERS ### -Actual @@ -148,6 +156,24 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NormalizeLineEnding + +Normalizes line endings before comparison, so that `\r\n`, `\r`, and the Unicode line separator are all treated as `\n`. +Use this to compare multi-line strings across platforms without failing on line-ending style. +Unlike `-IgnoreWhitespace`, the newlines and their positions are kept, so indentation and blank lines are still compared. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). @@ -174,4 +200,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeTrue.mdx b/docs/commands/Should-BeTrue.mdx index 3306d80c..426e5c1b 100644 --- a/docs/commands/Should-BeTrue.mdx +++ b/docs/commands/Should-BeTrue.mdx @@ -24,7 +24,7 @@ It does not convert input values to boolean, and will fail for any value is not ## SYNTAX ```powershell -Should-BeTrue [[-Actual] ] [[-Because] ] [] +Should-BeTrue [[-Actual] ] [-Because ] [] ``` ## DESCRIPTION @@ -83,7 +83,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 2 +Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -115,4 +115,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeTruthy.mdx b/docs/commands/Should-BeTruthy.mdx index b959914d..ae389f6b 100644 --- a/docs/commands/Should-BeTruthy.mdx +++ b/docs/commands/Should-BeTruthy.mdx @@ -24,7 +24,7 @@ It converts input values to boolean, and will fail for any value is not $true, o ## SYNTAX ```powershell -Should-BeTruthy [[-Actual] ] [[-Because] ] [] +Should-BeTruthy [[-Actual] ] [-Because ] [] ``` ## DESCRIPTION @@ -84,7 +84,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 2 +Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -116,4 +116,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-ContainCollection.mdx b/docs/commands/Should-ContainCollection.mdx index 899d7e4c..a0609395 100644 --- a/docs/commands/Should-ContainCollection.mdx +++ b/docs/commands/Should-ContainCollection.mdx @@ -24,7 +24,8 @@ It does not compare the types of the input collections. ## SYNTAX ```powershell -Should-ContainCollection [[-Actual] ] [-Expected] [-Because ] [] +Should-ContainCollection [[-Actual] ] [-Expected] [-IgnoreOrder] [-Because ] + [] ``` ## DESCRIPTION @@ -34,6 +35,9 @@ Gaps between the matched items are allowed, but each actual item is used at most A single value is treated as a one-item collection. Items are compared using PowerShell equality, the same as the `-contains` operator. +Use `-IgnoreOrder` to check that the expected items are present in any order. +Each actual item is still used at most once, so repeated expected items need at least as many matching items in the actual collection. + ## EXAMPLES ### EXAMPLE 1 @@ -50,6 +54,15 @@ Gaps between them, as in `@(1, 3)`, are allowed, and a single value is treated a ### EXAMPLE 2 +```powershell +'b', 3, 2, 'a' | Should-ContainCollection @('a', 2) -IgnoreOrder +1, 2, 3 | Should-ContainCollection @(3, 2, 1) -IgnoreOrder +``` + +These assertions pass, because with `-IgnoreOrder` the expected items only need to be present, not in any particular order. + +### EXAMPLE 3 + ```powershell 1, 2, 3 | Should-ContainCollection @(3, 4) 1, 2, 3 | Should-ContainCollection @(3, 2, 1) @@ -79,7 +92,8 @@ Accept wildcard characters: False ### -Expected -One or more items to look for as an ordered subsequence. +One or more items to look for. +By default they must appear as an ordered subsequence; with `-IgnoreOrder` the order does not matter. A single value is treated as a one-item collection. ```yaml @@ -94,6 +108,22 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -IgnoreOrder + +Ignores the order of the items, so the expected items only need to be present in the actual collection, in any order. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Because The reason why the input should be the expected value. @@ -134,4 +164,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-HaveParameter.mdx b/docs/commands/Should-HaveParameter.mdx index 3a3c582f..2559ee2c 100644 --- a/docs/commands/Should-HaveParameter.mdx +++ b/docs/commands/Should-HaveParameter.mdx @@ -265,4 +265,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-HaveType.mdx b/docs/commands/Should-HaveType.mdx index 45b584e3..04a1d352 100644 --- a/docs/commands/Should-HaveType.mdx +++ b/docs/commands/Should-HaveType.mdx @@ -23,7 +23,7 @@ Asserts that the input is of the expected type. ## SYNTAX ```powershell -Should-HaveType [[-Actual] ] [-Expected] [-Because ] [] +Should-HaveType [[-Actual] ] [-Expected] [-Because ] [] ``` ## DESCRIPTION @@ -31,6 +31,9 @@ Should-HaveType [[-Actual] ] [-Expected] [-Because ] [] [[-Expected] ] [-Because ] [-CaseSensitive] - [-IgnoreWhitespace] [] +Should-NotBeString [[-Actual] ] [-Expected] [-Because ] [-CaseSensitive] + [-IgnoreWhitespace] [-TrimWhitespace] [-NormalizeLineEnding] [] ``` ## DESCRIPTION @@ -77,7 +77,7 @@ Type: String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: 1 Default value: None Accept pipeline input: False @@ -132,6 +132,40 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -TrimWhitespace + +Trims whitespace at the start and end of the string. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NormalizeLineEnding + +Normalizes line endings before comparison, so that `\r\n`, `\r`, and the Unicode line separator are all treated as `\n`. +Use this to compare multi-line strings across platforms without failing on line-ending style. +Unlike `-IgnoreWhitespace`, the newlines and their positions are kept, so indentation and blank lines are still compared. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). @@ -158,4 +192,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-NotBeWhiteSpaceString.mdx b/docs/commands/Should-NotBeWhiteSpaceString.mdx index c00369fd..2177b362 100644 --- a/docs/commands/Should-NotBeWhiteSpaceString.mdx +++ b/docs/commands/Should-NotBeWhiteSpaceString.mdx @@ -121,4 +121,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-NotContainCollection.mdx b/docs/commands/Should-NotContainCollection.mdx index e8257bf1..d8e9a737 100644 --- a/docs/commands/Should-NotContainCollection.mdx +++ b/docs/commands/Should-NotContainCollection.mdx @@ -132,4 +132,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-NotHaveParameter.mdx b/docs/commands/Should-NotHaveParameter.mdx index 44f3d8b3..612e258b 100644 --- a/docs/commands/Should-NotHaveParameter.mdx +++ b/docs/commands/Should-NotHaveParameter.mdx @@ -133,4 +133,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-NotHaveType.mdx b/docs/commands/Should-NotHaveType.mdx index 1fa4c824..4ff5ad2e 100644 --- a/docs/commands/Should-NotHaveType.mdx +++ b/docs/commands/Should-NotHaveType.mdx @@ -23,7 +23,7 @@ Asserts that the input is not of the expected type. ## SYNTAX ```powershell -Should-NotHaveType [[-Actual] ] [-Expected] [-Because ] [] +Should-NotHaveType [[-Actual] ] [-Expected] [-Because ] [] ``` ## DESCRIPTION @@ -31,6 +31,8 @@ Should-NotHaveType [[-Actual] ] [-Expected] [-Because ] [ This assertion uses `-is` to verify that the actual value is not assignable to the expected type. Derived types and implemented interfaces still count as the expected type. +When the expected type is given as a name that does not resolve to a loaded .NET type, the assertion falls back to matching against the actual value's `PSTypeNames`, so PowerShell custom types are supported too. + ## EXAMPLES ### EXAMPLE 1 @@ -63,9 +65,10 @@ Accept wildcard characters: False ### -Expected The expected type. +Provide a `[Type]`, a type name that resolves to a loaded .NET type, or a custom type name to match against the actual value's `PSTypeNames`. ```yaml -Type: Type +Type: Object Parameter Sets: (All) Aliases: @@ -118,4 +121,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-NotInvoke.mdx b/docs/commands/Should-NotInvoke.mdx index 815eff5e..61fab442 100644 --- a/docs/commands/Should-NotInvoke.mdx +++ b/docs/commands/Should-NotInvoke.mdx @@ -320,4 +320,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-NotMatchString.mdx b/docs/commands/Should-NotMatchString.mdx index 179ea94a..9bc75432 100644 --- a/docs/commands/Should-NotMatchString.mdx +++ b/docs/commands/Should-NotMatchString.mdx @@ -150,4 +150,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-Throw.mdx b/docs/commands/Should-Throw.mdx index d38f28c3..01e7c27c 100644 --- a/docs/commands/Should-Throw.mdx +++ b/docs/commands/Should-Throw.mdx @@ -24,7 +24,7 @@ Asserts that a script block throws an exception. ```powershell Should-Throw -ScriptBlock [[-ExceptionMessage] ] [[-FullyQualifiedErrorId] ] - [[-ExceptionType] ] [[-Because] ] [-AllowNonTerminatingError] [] + [[-ExceptionType] ] [-Because ] [-AllowNonTerminatingError] [] ``` ## DESCRIPTION @@ -135,7 +135,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 4 +Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -181,4 +181,4 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should.mdx b/docs/commands/Should.mdx index e004e434..23ba1525 100644 --- a/docs/commands/Should.mdx +++ b/docs/commands/Should.mdx @@ -1221,4 +1221,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.1.0](https://github.com/pester/pester).* diff --git a/docs/commands/docusaurus.sidebar.js b/docs/commands/docusaurus.sidebar.js index 58ff74d4..865c0fd7 100644 --- a/docs/commands/docusaurus.sidebar.js +++ b/docs/commands/docusaurus.sidebar.js @@ -31,6 +31,7 @@ module.exports = [ 'commands/New-MockObject', 'commands/New-PesterConfiguration', 'commands/New-PesterContainer', + 'commands/New-ShouldAssertion', 'commands/Set-ItResult', 'commands/Should-All', 'commands/Should-Any', diff --git a/docs/usage/configuration.mdx b/docs/usage/configuration.mdx index 6e75507e..19bb232d 100644 --- a/docs/usage/configuration.mdx +++ b/docs/usage/configuration.mdx @@ -127,7 +127,7 @@ In Pester v6 you don't have to set `TestResult.Enabled` or `CodeCoverage.Enabled -*This section was generated using Pester 6.0.0-rc5.* +*This section was generated using Pester 6.1.0.* ### Run @@ -146,11 +146,12 @@ General runtime options for Pester including tests containers to execute. | Run.PassThru | Return result object to the pipeline after finishing the test run. | `bool` | `$false` | | Run.SkipRun | Runs the discovery phase but skips run. Use it with PassThru to get object populated with all tests. | `bool` | `$false` | | Run.Parallel | EXPERIMENTAL: Run test files in parallel, each file in its own runspace, using PowerShell 7+ 'ForEach-Object -Parallel'. Files that contain the '#pester:no-parallel' directive run sequentially after the parallel batch. Falls back to a sequential run on Windows PowerShell 5.1, when non-file containers (ScriptBlock) are used, when CodeCoverage is enabled, or when Run.SkipRemainingOnFailure is set to 'Run'. | `bool` | `$false` | -| Run.BeforeContainer | EXPERIMENTAL: One or more ScriptBlocks run before each test file is discovered and run, in both sequential and parallel runs. Use it to import helper modules or dot-source setup that the parent session would normally provide, e.g. \{ . './setup.ps1' \} - this is especially useful in parallel runs, where each worker starts from a clean runspace. One scriptblock is usually enough and can dot-source as many files as needed. When set, the convention file is ignored; when not set, Pester dot-sources a 'Pester.BeforeContainer.ps1' from the repository root (Run.RepoRoot) if one is present. | `scriptblock[]` | `@()` | | Run.ParallelThrottleLimit | EXPERIMENTAL: Maximum number of test files to run at the same time when Run.Parallel is enabled, passed through to 'ForEach-Object -Parallel -ThrottleLimit'. The default 0 uses all available processors ([Environment]::ProcessorCount). Set a lower number to cap how many runspaces run concurrently. Only used when Run.Parallel is enabled. | `int` | `0` | | Run.SkipRemainingOnFailure | Skips remaining tests after failure for selected scope, options are None, Run, Container and Block. | `string` | `'None'` | | Run.FailOnNullOrEmptyForEach | Fails discovery when -ForEach is provided $null or @() in a block or test. Can be overridden for a specific Describe/Context/It using -AllowNullOrEmptyForEach. | `bool` | `$true` | -| Run.RepoRoot | Root directory of the repository. Found by searching for the .git directory recursively. When not found, the current working directory is used. | `string` | `'C:\MyProject'` | +| Run.RepoRoot | EXPERIMENTAL: Root directory of the repository. Found by searching for the .git directory recursively. When not found, the current working directory is used. Before each test file is discovered and run - in both sequential and parallel runs - Pester dot-sources a 'Pester.BeforeContainer.ps1' from this directory if one is present, so helper modules or dot-sourced setup the parent session would normally provide are available to every container. This is especially useful in parallel runs where each worker starts from a clean runspace and re-runs it. | `string` | `'C:\MyProject'` | +| Run.Shuffle | EXPERIMENTAL: Shuffle the order in which test files, and the blocks (Describe/Context) and tests (It) inside them, are executed. Items are only reordered within their own level. Uses Run.ShuffleSeed so a run can be repeated, and helps surface hidden dependencies between tests. A single file can opt out with a '#pester:no-shuffle' comment. | `bool` | `$false` | +| Run.ShuffleSeed | EXPERIMENTAL: Seed used to shuffle execution order when Run.Shuffle is enabled. The default 0 picks a new seed for each run and reports it at the start, so the run can be repeated by setting Run.ShuffleSeed to that value. | `int` | `0` | ### Filter @@ -238,7 +239,9 @@ Options to customize the console output generated by Pester. | Output.StackTraceVerbosity | The verbosity of stacktrace output, options are None, FirstLine, Filtered and Full. | `string` | `'Filtered'` | | Output.CIFormat | The CI format of error output in build logs, options are None, Auto, AzureDevops and GithubActions. | `string` | `'Auto'` | | Output.CILogLevel | The CI log level in build logs, options are Error and Warning. | `string` | `'Error'` | +| Output.CIDebugOutput | Whether to automatically surface verbose and debug output when a CI system has its debug switch enabled (Azure DevOps 'System.Debug', GitHub Actions runner debug logging), options are None and Auto. | `string` | `'Auto'` | | Output.RenderMode | The mode used to render console output, options are Auto, Ansi, ConsoleColor and Plaintext. | `string` | `'Auto'` | +| Output.ShowTags | Append the tags of each Describe, Context and It to its console output line, e.g. 'Describing Get-Planet [Tags: Slow, Unix]'. | `bool` | `$false` | ### TestDrive @@ -260,4 +263,14 @@ Options to configure the TestRegistry feature. TestRegistry is only available on |--------|-------------|-----:|--------:| | TestRegistry.Enabled | Enable TestRegistry. | `bool` | `$true` | + +### Mock + +Mock configuration for Pester. + +
+| Option | Description | Type | Default | +|--------|-------------|-----:|--------:| +| Mock.Global | EXPERIMENTAL: Make every mock a global mock, so it is applied to calls of the command from any module or script in the runspace. ModuleName is then used only as a hint to resolve the command, not to scope where the mock applies. Use at your own risk! | `bool` | `$false` | +
From 76314140190d475bf9a073cfc658acb014b934a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Jare=C5=A1?= Date: Tue, 11 Aug 2026 20:41:50 +0200 Subject: [PATCH 2/2] Update generated v5 docs to 5.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. 🤖 --- versioned_docs/version-v5/commands/Add-ShouldOperator.mdx | 2 +- versioned_docs/version-v5/commands/AfterAll.mdx | 2 +- versioned_docs/version-v5/commands/AfterEach.mdx | 2 +- versioned_docs/version-v5/commands/Assert-MockCalled.mdx | 2 +- .../version-v5/commands/Assert-VerifiableMock.mdx | 2 +- versioned_docs/version-v5/commands/BeforeAll.mdx | 2 +- versioned_docs/version-v5/commands/BeforeDiscovery.mdx | 2 +- versioned_docs/version-v5/commands/BeforeEach.mdx | 2 +- versioned_docs/version-v5/commands/Context.mdx | 2 +- .../version-v5/commands/ConvertTo-JUnitReport.mdx | 2 +- .../version-v5/commands/ConvertTo-NUnitReport.mdx | 2 +- .../version-v5/commands/ConvertTo-Pester4Result.mdx | 2 +- versioned_docs/version-v5/commands/Describe.mdx | 2 +- versioned_docs/version-v5/commands/Export-JUnitReport.mdx | 2 +- versioned_docs/version-v5/commands/Export-NUnitReport.mdx | 2 +- versioned_docs/version-v5/commands/Get-ShouldOperator.mdx | 2 +- versioned_docs/version-v5/commands/InModuleScope.mdx | 2 +- versioned_docs/version-v5/commands/Invoke-Pester.mdx | 2 +- versioned_docs/version-v5/commands/It.mdx | 2 +- versioned_docs/version-v5/commands/Mock.mdx | 2 +- versioned_docs/version-v5/commands/New-Fixture.mdx | 2 +- versioned_docs/version-v5/commands/New-MockObject.mdx | 6 +++--- .../version-v5/commands/New-PesterConfiguration.mdx | 2 +- versioned_docs/version-v5/commands/New-PesterContainer.mdx | 2 +- versioned_docs/version-v5/commands/Set-ItResult.mdx | 2 +- versioned_docs/version-v5/commands/Should.mdx | 2 +- versioned_docs/version-v5/usage/configuration.mdx | 2 +- 27 files changed, 29 insertions(+), 29 deletions(-) diff --git a/versioned_docs/version-v5/commands/Add-ShouldOperator.mdx b/versioned_docs/version-v5/commands/Add-ShouldOperator.mdx index cc931bc6..01cdad13 100644 --- a/versioned_docs/version-v5/commands/Add-ShouldOperator.mdx +++ b/versioned_docs/version-v5/commands/Add-ShouldOperator.mdx @@ -166,4 +166,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v5/commands/AfterAll.mdx b/versioned_docs/version-v5/commands/AfterAll.mdx index e7735c35..61a75623 100644 --- a/versioned_docs/version-v5/commands/AfterAll.mdx +++ b/versioned_docs/version-v5/commands/AfterAll.mdx @@ -107,4 +107,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v5/commands/AfterEach.mdx b/versioned_docs/version-v5/commands/AfterEach.mdx index ebd7bf62..6db1552a 100644 --- a/versioned_docs/version-v5/commands/AfterEach.mdx +++ b/versioned_docs/version-v5/commands/AfterEach.mdx @@ -104,4 +104,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v5/commands/Assert-MockCalled.mdx b/versioned_docs/version-v5/commands/Assert-MockCalled.mdx index 0d6bfc28..b00215e7 100644 --- a/versioned_docs/version-v5/commands/Assert-MockCalled.mdx +++ b/versioned_docs/version-v5/commands/Assert-MockCalled.mdx @@ -184,4 +184,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v5/commands/Assert-VerifiableMock.mdx b/versioned_docs/version-v5/commands/Assert-VerifiableMock.mdx index e28b3062..b6d1c1e5 100644 --- a/versioned_docs/version-v5/commands/Assert-VerifiableMock.mdx +++ b/versioned_docs/version-v5/commands/Assert-VerifiableMock.mdx @@ -61,4 +61,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v5/commands/BeforeAll.mdx b/versioned_docs/version-v5/commands/BeforeAll.mdx index 4b4c5389..0d85f307 100644 --- a/versioned_docs/version-v5/commands/BeforeAll.mdx +++ b/versioned_docs/version-v5/commands/BeforeAll.mdx @@ -116,4 +116,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v5/commands/BeforeDiscovery.mdx b/versioned_docs/version-v5/commands/BeforeDiscovery.mdx index 6136a848..ffdf9e25 100644 --- a/versioned_docs/version-v5/commands/BeforeDiscovery.mdx +++ b/versioned_docs/version-v5/commands/BeforeDiscovery.mdx @@ -94,4 +94,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v5/commands/BeforeEach.mdx b/versioned_docs/version-v5/commands/BeforeEach.mdx index 254d3ce4..486c6a4c 100644 --- a/versioned_docs/version-v5/commands/BeforeEach.mdx +++ b/versioned_docs/version-v5/commands/BeforeEach.mdx @@ -101,4 +101,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v5/commands/Context.mdx b/versioned_docs/version-v5/commands/Context.mdx index 267406a7..aa875021 100644 --- a/versioned_docs/version-v5/commands/Context.mdx +++ b/versioned_docs/version-v5/commands/Context.mdx @@ -183,4 +183,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v5/commands/ConvertTo-JUnitReport.mdx b/versioned_docs/version-v5/commands/ConvertTo-JUnitReport.mdx index 9f80e789..2f175a6d 100644 --- a/versioned_docs/version-v5/commands/ConvertTo-JUnitReport.mdx +++ b/versioned_docs/version-v5/commands/ConvertTo-JUnitReport.mdx @@ -118,4 +118,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v5/commands/ConvertTo-NUnitReport.mdx b/versioned_docs/version-v5/commands/ConvertTo-NUnitReport.mdx index a3ea5c13..80424162 100644 --- a/versioned_docs/version-v5/commands/ConvertTo-NUnitReport.mdx +++ b/versioned_docs/version-v5/commands/ConvertTo-NUnitReport.mdx @@ -145,4 +145,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v5/commands/ConvertTo-Pester4Result.mdx b/versioned_docs/version-v5/commands/ConvertTo-Pester4Result.mdx index 2e69c048..a80e71f1 100644 --- a/versioned_docs/version-v5/commands/ConvertTo-Pester4Result.mdx +++ b/versioned_docs/version-v5/commands/ConvertTo-Pester4Result.mdx @@ -86,4 +86,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v5/commands/Describe.mdx b/versioned_docs/version-v5/commands/Describe.mdx index ed9f6da9..d269d67c 100644 --- a/versioned_docs/version-v5/commands/Describe.mdx +++ b/versioned_docs/version-v5/commands/Describe.mdx @@ -193,4 +193,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v5/commands/Export-JUnitReport.mdx b/versioned_docs/version-v5/commands/Export-JUnitReport.mdx index 90cd21c2..53eb8103 100644 --- a/versioned_docs/version-v5/commands/Export-JUnitReport.mdx +++ b/versioned_docs/version-v5/commands/Export-JUnitReport.mdx @@ -105,4 +105,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v5/commands/Export-NUnitReport.mdx b/versioned_docs/version-v5/commands/Export-NUnitReport.mdx index 1600c4f4..0f053b47 100644 --- a/versioned_docs/version-v5/commands/Export-NUnitReport.mdx +++ b/versioned_docs/version-v5/commands/Export-NUnitReport.mdx @@ -121,4 +121,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v5/commands/Get-ShouldOperator.mdx b/versioned_docs/version-v5/commands/Get-ShouldOperator.mdx index 0de3383e..0f19f8e1 100644 --- a/versioned_docs/version-v5/commands/Get-ShouldOperator.mdx +++ b/versioned_docs/version-v5/commands/Get-ShouldOperator.mdx @@ -94,4 +94,4 @@ standard PowerShell discovery patterns (like `Get-Help Should -Parameter *`). ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v5/commands/InModuleScope.mdx b/versioned_docs/version-v5/commands/InModuleScope.mdx index f0cd06f8..3bae4688 100644 --- a/versioned_docs/version-v5/commands/InModuleScope.mdx +++ b/versioned_docs/version-v5/commands/InModuleScope.mdx @@ -206,4 +206,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v5/commands/Invoke-Pester.mdx b/versioned_docs/version-v5/commands/Invoke-Pester.mdx index 04cfb476..7358d9a5 100644 --- a/versioned_docs/version-v5/commands/Invoke-Pester.mdx +++ b/versioned_docs/version-v5/commands/Invoke-Pester.mdx @@ -645,4 +645,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v5/commands/It.mdx b/versioned_docs/version-v5/commands/It.mdx index fe774f05..87ffe1cb 100644 --- a/versioned_docs/version-v5/commands/It.mdx +++ b/versioned_docs/version-v5/commands/It.mdx @@ -262,4 +262,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v5/commands/Mock.mdx b/versioned_docs/version-v5/commands/Mock.mdx index 6a57b39e..8ff05ac5 100644 --- a/versioned_docs/version-v5/commands/Mock.mdx +++ b/versioned_docs/version-v5/commands/Mock.mdx @@ -339,4 +339,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v5/commands/New-Fixture.mdx b/versioned_docs/version-v5/commands/New-Fixture.mdx index cef9994b..af468c29 100644 --- a/versioned_docs/version-v5/commands/New-Fixture.mdx +++ b/versioned_docs/version-v5/commands/New-Fixture.mdx @@ -142,4 +142,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v5/commands/New-MockObject.mdx b/versioned_docs/version-v5/commands/New-MockObject.mdx index ea457b2e..b9fdf9f4 100644 --- a/versioned_docs/version-v5/commands/New-MockObject.mdx +++ b/versioned_docs/version-v5/commands/New-MockObject.mdx @@ -139,7 +139,7 @@ Accept wildcard characters: False ### -Properties -Properties to define, specified as a hashtable, in format `@{ PropertyName = value }`. +Properties to define, specified as a hashtable, in format `@\{ PropertyName = value \}`. ```yaml Type: Hashtable @@ -155,7 +155,7 @@ Accept wildcard characters: False ### -Methods -Methods to define, specified as a hashtable, in format `@{ MethodName = scriptBlock }`. +Methods to define, specified as a hashtable, in format `@\{ MethodName = scriptBlock \}`. ScriptBlock can define param block, and it will receive arguments that were provided to the function call based on order. @@ -210,4 +210,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v5/commands/New-PesterConfiguration.mdx b/versioned_docs/version-v5/commands/New-PesterConfiguration.mdx index 2471ed7a..a139ba20 100644 --- a/versioned_docs/version-v5/commands/New-PesterConfiguration.mdx +++ b/versioned_docs/version-v5/commands/New-PesterConfiguration.mdx @@ -119,4 +119,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v5/commands/New-PesterContainer.mdx b/versioned_docs/version-v5/commands/New-PesterContainer.mdx index 263eb1f4..c987dcb9 100644 --- a/versioned_docs/version-v5/commands/New-PesterContainer.mdx +++ b/versioned_docs/version-v5/commands/New-PesterContainer.mdx @@ -152,4 +152,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v5/commands/Set-ItResult.mdx b/versioned_docs/version-v5/commands/Set-ItResult.mdx index 47837aad..b0ee4b4e 100644 --- a/versioned_docs/version-v5/commands/Set-ItResult.mdx +++ b/versioned_docs/version-v5/commands/Set-ItResult.mdx @@ -163,4 +163,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v5/commands/Should.mdx b/versioned_docs/version-v5/commands/Should.mdx index 01fb2518..cfe939db 100644 --- a/versioned_docs/version-v5/commands/Should.mdx +++ b/versioned_docs/version-v5/commands/Should.mdx @@ -1186,4 +1186,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v5/usage/configuration.mdx b/versioned_docs/version-v5/usage/configuration.mdx index 903c654e..6ff05975 100644 --- a/versioned_docs/version-v5/usage/configuration.mdx +++ b/versioned_docs/version-v5/usage/configuration.mdx @@ -128,7 +128,7 @@ Tests Passed: 1, Failed: 0, Skipped: 0, Total: 1, NotRun: 0 -*This section was generated using Pester 5.8.0.* +*This section was generated using Pester 5.9.1.* ### Run