From 17449a070af65d451e5f3f5d1cec6b332dd86f45 Mon Sep 17 00:00:00 2001 From: Frode Flaten <3436158+fflaten@users.noreply.github.com> Date: Thu, 16 Jul 2026 20:54:41 +0000 Subject: [PATCH 01/17] Baseline Alt3.Docusaurus.PowerShell v2 command reference --- docs/commands/Add-ShouldOperator.mdx | 154 +- docs/commands/AfterAll.mdx | 37 +- docs/commands/AfterEach.mdx | 37 +- docs/commands/BeforeAll.mdx | 37 +- docs/commands/BeforeDiscovery.mdx | 37 +- docs/commands/BeforeEach.mdx | 37 +- docs/commands/Context.mdx | 209 +- docs/commands/ConvertTo-JUnitReport.mdx | 75 +- docs/commands/ConvertTo-NUnitReport.mdx | 102 +- docs/commands/ConvertTo-Pester4Result.mdx | 39 +- docs/commands/Describe.mdx | 215 +- docs/commands/Export-JUnitReport.mdx | 74 +- docs/commands/Export-NUnitReport.mdx | 97 +- docs/commands/Get-ShouldOperator.mdx | 37 +- docs/commands/InModuleScope.mdx | 123 +- docs/commands/Invoke-Pester.mdx | 320 +-- docs/commands/It.mdx | 205 +- docs/commands/Mock.mdx | 207 +- docs/commands/New-Fixture.mdx | 69 +- docs/commands/New-MockObject.mdx | 179 +- docs/commands/New-PesterConfiguration.mdx | 40 +- docs/commands/New-PesterContainer.mdx | 104 +- docs/commands/Set-ItResult.mdx | 102 +- docs/commands/Should-All.mdx | 98 +- docs/commands/Should-Any.mdx | 98 +- docs/commands/Should-Be.mdx | 93 +- docs/commands/Should-BeAfter.mdx | 213 +- docs/commands/Should-BeBefore.mdx | 213 +- docs/commands/Should-BeCollection.mdx | 125 +- docs/commands/Should-BeEmptyString.mdx | 62 +- docs/commands/Should-BeEquivalent.mdx | 174 +- docs/commands/Should-BeFalse.mdx | 65 +- docs/commands/Should-BeFalsy.mdx | 65 +- docs/commands/Should-BeFasterThan.mdx | 93 +- docs/commands/Should-BeGreaterThan.mdx | 93 +- docs/commands/Should-BeGreaterThanOrEqual.mdx | 93 +- docs/commands/Should-BeHashtable.mdx | 155 +- docs/commands/Should-BeLessThan.mdx | 93 +- docs/commands/Should-BeLessThanOrEqual.mdx | 93 +- docs/commands/Should-BeLikeString.mdx | 117 +- docs/commands/Should-BeNull.mdx | 62 +- docs/commands/Should-BeSame.mdx | 93 +- docs/commands/Should-BeSlowerThan.mdx | 93 +- docs/commands/Should-BeString.mdx | 168 +- docs/commands/Should-BeTrue.mdx | 65 +- docs/commands/Should-BeTruthy.mdx | 65 +- docs/commands/Should-ContainCollection.mdx | 98 +- docs/commands/Should-HaveParameter.mdx | 273 ++- docs/commands/Should-HaveType.mdx | 93 +- docs/commands/Should-Invoke.mdx | 317 +-- docs/commands/Should-MatchString.mdx | 117 +- docs/commands/Should-NotBe.mdx | 93 +- docs/commands/Should-NotBeEmptyString.mdx | 62 +- docs/commands/Should-NotBeLikeString.mdx | 118 +- docs/commands/Should-NotBeNull.mdx | 62 +- docs/commands/Should-NotBeSame.mdx | 93 +- docs/commands/Should-NotBeString.mdx | 145 +- .../commands/Should-NotBeWhiteSpaceString.mdx | 62 +- docs/commands/Should-NotContainCollection.mdx | 98 +- docs/commands/Should-NotHaveParameter.mdx | 104 +- docs/commands/Should-NotHaveType.mdx | 93 +- docs/commands/Should-NotInvoke.mdx | 319 +-- docs/commands/Should-NotMatchString.mdx | 117 +- docs/commands/Should-Throw.mdx | 179 +- docs/commands/Should.mdx | 1961 ++++++++++------- generate-command-reference.ps1 | 42 +- 66 files changed, 5652 insertions(+), 3819 deletions(-) diff --git a/docs/commands/Add-ShouldOperator.mdx b/docs/commands/Add-ShouldOperator.mdx index 8548e00d..9a21df2f 100644 --- a/docs/commands/Add-ShouldOperator.mdx +++ b/docs/commands/Add-ShouldOperator.mdx @@ -23,8 +23,8 @@ Register a Should Operator with Pester ## SYNTAX ```powershell -Add-ShouldOperator [-Name] [-Test] [[-Alias] ] [[-InternalName] ] - [-SupportsArrayInput] [] +Add-ShouldOperator [-Name] [-Test] [[-Alias] ] + [[-InternalName] ] [-SupportsArrayInput] ``` ## DESCRIPTION @@ -67,92 +67,120 @@ Example of how to create a simple custom assertion that checks if the input stri ## PARAMETERS -### -Name +### -Alias -The name of the assertion. -This will become a Named Parameter of Should. +A list of aliases for the Named Parameter. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Test +### -InternalName -The test function. -The function must return a PSObject with a [Bool]succeeded and a [string]failureMessage property. +If -Name is different from the actual function name, record the actual function name here. +Used by Get-ShouldOperator to pull function help. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Alias +### -Name -A list of aliases for the Named Parameter. +The name of the assertion. +This will become a Named Parameter of Should. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -InternalName +### -SupportsArrayInput -If -Name is different from the actual function name, record the actual function name here. -Used by Get-ShouldOperator to pull function help. +Does the test function support the passing an array of values to test. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -SupportsArrayInput +### -Test -Does the test function support the passing an array of values to test. +The test function. +The function must return a PSObject with a [Bool]succeeded and a [string]failureMessage property. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -162,8 +190,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/Add-ShouldOperator](https://pester.dev/docs/commands/Add-ShouldOperator) +- [https://pester.dev/docs/commands/Add-ShouldOperator](https://pester.dev/docs/commands/Add-ShouldOperator) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/AfterAll.mdx b/docs/commands/AfterAll.mdx index 9b4dff22..71bceb77 100644 --- a/docs/commands/AfterAll.mdx +++ b/docs/commands/AfterAll.mdx @@ -24,7 +24,7 @@ Context or Describe block. ## SYNTAX ```powershell -AfterAll [-Scriptblock] [] +AfterAll [-Scriptblock] ``` ## DESCRIPTION @@ -78,20 +78,28 @@ the tests in the Describe-block. A scriptblock with steps to be executed during teardown. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -101,10 +109,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/AfterAll](https://pester.dev/docs/commands/AfterAll) - -[https://pester.dev/docs/usage/setup-and-teardown](https://pester.dev/docs/usage/setup-and-teardown) +- [https://pester.dev/docs/commands/AfterAll](https://pester.dev/docs/commands/AfterAll) +- [https://pester.dev/docs/usage/setup-and-teardown](https://pester.dev/docs/usage/setup-and-teardown) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/AfterEach.mdx b/docs/commands/AfterEach.mdx index b1e89855..019a9103 100644 --- a/docs/commands/AfterEach.mdx +++ b/docs/commands/AfterEach.mdx @@ -24,7 +24,7 @@ the current Context or Describe block. ## SYNTAX ```powershell -AfterEach [-Scriptblock] [] +AfterEach [-Scriptblock] ``` ## DESCRIPTION @@ -75,20 +75,28 @@ The example uses AfterEach to remove a temporary file after each test. A scriptblock with steps to be executed during teardown. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -98,10 +106,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/AfterEach](https://pester.dev/docs/commands/AfterEach) - -[https://pester.dev/docs/usage/setup-and-teardown](https://pester.dev/docs/usage/setup-and-teardown) +- [https://pester.dev/docs/commands/AfterEach](https://pester.dev/docs/commands/AfterEach) +- [https://pester.dev/docs/usage/setup-and-teardown](https://pester.dev/docs/usage/setup-and-teardown) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/BeforeAll.mdx b/docs/commands/BeforeAll.mdx index b92b32c1..e2e5483b 100644 --- a/docs/commands/BeforeAll.mdx +++ b/docs/commands/BeforeAll.mdx @@ -24,7 +24,7 @@ Context or Describe block. ## SYNTAX ```powershell -BeforeAll [-Scriptblock] [] +BeforeAll [-Scriptblock] ``` ## DESCRIPTION @@ -87,20 +87,28 @@ the results in separate tests. A scriptblock with steps to be executed during setup. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -110,10 +118,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/BeforeAll](https://pester.dev/docs/commands/BeforeAll) - -[https://pester.dev/docs/usage/setup-and-teardown](https://pester.dev/docs/usage/setup-and-teardown) +- [https://pester.dev/docs/commands/BeforeAll](https://pester.dev/docs/commands/BeforeAll) +- [https://pester.dev/docs/usage/setup-and-teardown](https://pester.dev/docs/usage/setup-and-teardown) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/BeforeDiscovery.mdx b/docs/commands/BeforeDiscovery.mdx index 9da8056b..d2d81af3 100644 --- a/docs/commands/BeforeDiscovery.mdx +++ b/docs/commands/BeforeDiscovery.mdx @@ -23,7 +23,7 @@ Runs setup code that is used during Discovery phase. ## SYNTAX ```powershell -BeforeDiscovery [-ScriptBlock] [] +BeforeDiscovery [-ScriptBlock] ``` ## DESCRIPTION @@ -65,20 +65,28 @@ dynamically create a Describe-block and tests for each file found. The ScriptBlock to run. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -88,10 +96,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/BeforeDiscovery](https://pester.dev/docs/commands/BeforeDiscovery) - -[https://pester.dev/docs/usage/data-driven-tests](https://pester.dev/docs/usage/data-driven-tests) +- [https://pester.dev/docs/commands/BeforeDiscovery](https://pester.dev/docs/commands/BeforeDiscovery) +- [https://pester.dev/docs/usage/data-driven-tests](https://pester.dev/docs/usage/data-driven-tests) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/BeforeEach.mdx b/docs/commands/BeforeEach.mdx index a2f7f02e..bfc9c644 100644 --- a/docs/commands/BeforeEach.mdx +++ b/docs/commands/BeforeEach.mdx @@ -24,7 +24,7 @@ the current Context or Describe block. ## SYNTAX ```powershell -BeforeEach [-Scriptblock] [] +BeforeEach [-Scriptblock] ``` ## DESCRIPTION @@ -72,20 +72,28 @@ The example uses BeforeEach to ensure a clean sample-file is used for each test. A scriptblock with steps to be executed during setup. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -95,10 +103,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/BeforeEach](https://pester.dev/docs/commands/BeforeEach) - -[https://pester.dev/docs/usage/setup-and-teardown](https://pester.dev/docs/usage/setup-and-teardown) +- [https://pester.dev/docs/commands/BeforeEach](https://pester.dev/docs/commands/BeforeEach) +- [https://pester.dev/docs/usage/setup-and-teardown](https://pester.dev/docs/usage/setup-and-teardown) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Context.mdx b/docs/commands/Context.mdx index 11bb5b04..659db79a 100644 --- a/docs/commands/Context.mdx +++ b/docs/commands/Context.mdx @@ -23,8 +23,8 @@ Provides logical grouping of It blocks within a single Describe block. ## SYNTAX ```powershell -Context [-Name] [-Tag ] [[-Fixture] ] [-Skip] [-AllowNullOrEmptyForEach] - [-ForEach ] [] +Context [-Name] [[-Fixture] ] [-Tag ] [-Skip] + [-AllowNullOrEmptyForEach] [-ForEach ] ``` ## DESCRIPTION @@ -69,40 +69,26 @@ Example of how to use Context for grouping different tests ## PARAMETERS -### -Name - -The name of the Context. -This is a phrase describing a set of tests within a describe. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tag +### -AllowNullOrEmptyForEach -Optional parameter containing an array of strings. -When calling Invoke-Pester, -it is possible to specify a -Tag parameter which will only execute Context blocks -containing the same Tag. +Allows empty or null values for -ForEach when Run.FailOnNullOrEmptyForEach is enabled. +This might be excepted in certain scenarios like using external data. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: Tags - -Required: False -Position: Named -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Fixture @@ -112,75 +98,123 @@ This may include setup specific to the context and one or more It blocks that validate the expected outcomes. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Skip +### -ForEach -Use this parameter to explicitly mark the block to be skipped. -This is preferable to temporarily -commenting out a block, because it remains listed in the output. +Allows data driven tests to be written. +Takes an array of data and generates one block for each item in the array, and makes the item +available as $_ in all child blocks. +When the array is an array of hashtables, it additionally +defines each key in the hashtable as variable. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -AllowNullOrEmptyForEach +### -Name -Allows empty or null values for -ForEach when Run.FailOnNullOrEmptyForEach is enabled. -This might be excepted in certain scenarios like using external data. +The name of the Context. +This is a phrase describing a set of tests within a describe. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Skip + +Use this parameter to explicitly mark the block to be skipped. +This is preferable to temporarily +commenting out a block, because it remains listed in the output. -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +```yaml +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ForEach +### -Tag -Allows data driven tests to be written. -Takes an array of data and generates one block for each item in the array, and makes the item -available as $_ in all child blocks. -When the array is an array of hashtables, it additionally -defines each key in the hashtable as variable. +Optional parameter containing an array of strings. +When calling Invoke-Pester, +it is possible to specify a -Tag parameter which will only execute Context blocks +containing the same Tag. ```yaml -Type: Object -Parameter Sets: (All) +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +- Tags +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -190,14 +224,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/Context](https://pester.dev/docs/commands/Context) - -[https://pester.dev/docs/usage/test-file-structure](https://pester.dev/docs/usage/test-file-structure) - -[https://pester.dev/docs/usage/mocking](https://pester.dev/docs/usage/mocking) - -[https://pester.dev/docs/usage/testdrive](https://pester.dev/docs/usage/testdrive) +- [https://pester.dev/docs/commands/Context](https://pester.dev/docs/commands/Context) +- [https://pester.dev/docs/usage/test-file-structure](https://pester.dev/docs/usage/test-file-structure) +- [https://pester.dev/docs/usage/mocking](https://pester.dev/docs/usage/mocking) +- [https://pester.dev/docs/usage/testdrive](https://pester.dev/docs/usage/testdrive) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/ConvertTo-JUnitReport.mdx b/docs/commands/ConvertTo-JUnitReport.mdx index 5feff896..97d749c0 100644 --- a/docs/commands/ConvertTo-JUnitReport.mdx +++ b/docs/commands/ConvertTo-JUnitReport.mdx @@ -23,7 +23,7 @@ Converts a Pester result-object to an JUnit-compatible XML report ## SYNTAX ```powershell -ConvertTo-JUnitReport [-Result] [-AsString] [] +ConvertTo-JUnitReport [-Result] [-AsString] ``` ## DESCRIPTION @@ -66,59 +66,74 @@ The returned object is a string. ## PARAMETERS -### -Result +### -AsString -Result object from a Pester-run. -This can be retrieved using Invoke-Pester --Passthru or by using the Run.PassThru configuration-option. +Returns the XML-report as a string. ```yaml -Type: Run -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -AsString +### -Result -Returns the XML-report as a string. +Result object from a Pester-run. +This can be retrieved using Invoke-Pester +-Passthru or by using the Run.PassThru configuration-option. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: Pester.Run +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### Pester.Run + ## OUTPUTS ### System.Xml.XmlDocument ### System.String + ## NOTES ## RELATED LINKS -[https://pester.dev/docs/commands/ConvertTo-JUnitReport](https://pester.dev/docs/commands/ConvertTo-JUnitReport) - -[https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) +- [https://pester.dev/docs/commands/ConvertTo-JUnitReport](https://pester.dev/docs/commands/ConvertTo-JUnitReport) +- [https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/ConvertTo-NUnitReport.mdx b/docs/commands/ConvertTo-NUnitReport.mdx index 31a0d9c9..e17e5395 100644 --- a/docs/commands/ConvertTo-NUnitReport.mdx +++ b/docs/commands/ConvertTo-NUnitReport.mdx @@ -23,7 +23,7 @@ Converts a Pester result-object to an NUnit 2.5 or 3-compatible XML-report ## SYNTAX ```powershell -ConvertTo-NUnitReport [-Result] [-AsString] [[-Format] ] [] +ConvertTo-NUnitReport [-Result] [[-Format] ] [-AsString] ``` ## DESCRIPTION @@ -77,75 +77,95 @@ The returned object is a string. ## PARAMETERS -### -Result +### -AsString -Result object from a Pester-run. -This can be retrieved using Invoke-Pester --Passthru or by using the Run.PassThru configuration-option. +Returns the XML-report as a string. ```yaml -Type: Run -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -AsString +### -Format -Returns the XML-report as a string. +Specifies the NUnit-schema to be used. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: NUnit2.5 +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Format +### -Result -Specifies the NUnit-schema to be used. +Result object from a Pester-run. +This can be retrieved using Invoke-Pester +-Passthru or by using the Run.PassThru configuration-option. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: NUnit2.5 -Accept pipeline input: False -Accept wildcard characters: False +Type: Pester.Run +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### Pester.Run + ## OUTPUTS ### System.Xml.XmlDocument ### System.String + ## NOTES ## RELATED LINKS -[https://pester.dev/docs/commands/ConvertTo-NUnitReport](https://pester.dev/docs/commands/ConvertTo-NUnitReport) - -[https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) +- [https://pester.dev/docs/commands/ConvertTo-NUnitReport](https://pester.dev/docs/commands/ConvertTo-NUnitReport) +- [https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/ConvertTo-Pester4Result.mdx b/docs/commands/ConvertTo-Pester4Result.mdx index 2fcdcd98..a720534a 100644 --- a/docs/commands/ConvertTo-Pester4Result.mdx +++ b/docs/commands/ConvertTo-Pester4Result.mdx @@ -23,7 +23,7 @@ Converts a Pester 5 result-object to an Pester 4-compatible object ## SYNTAX ```powershell -ConvertTo-Pester4Result [-PesterResult] [] +ConvertTo-Pester4Result [-PesterResult] ``` ## DESCRIPTION @@ -57,33 +57,42 @@ This can be retrieved using Invoke-Pester -Passthru or by using the Run.PassThru configuration-option. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES ## RELATED LINKS -[https://pester.dev/docs/commands/ConvertTo-Pester4Result](https://pester.dev/docs/commands/ConvertTo-Pester4Result) - -[https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) +- [https://pester.dev/docs/commands/ConvertTo-Pester4Result](https://pester.dev/docs/commands/ConvertTo-Pester4Result) +- [https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Describe.mdx b/docs/commands/Describe.mdx index 51ebcfaa..2bfa060e 100644 --- a/docs/commands/Describe.mdx +++ b/docs/commands/Describe.mdx @@ -23,8 +23,8 @@ Creates a logical group of tests. ## SYNTAX ```powershell -Describe [-Name] [-Tag ] [[-Fixture] ] [-Skip] [-AllowNullOrEmptyForEach] - [-ForEach ] [] +Describe [-Name] [[-Fixture] ] [-Tag ] [-Skip] + [-AllowNullOrEmptyForEach] [-ForEach ] ``` ## DESCRIPTION @@ -32,8 +32,8 @@ Describe [-Name] [-Tag ] [[-Fixture] ] [-Skip] [ Creates a logical group of tests. All Mocks, TestDrive and TestRegistry contents defined within a Describe block are scoped to that Describe; they -will no longer be present when the Describe block exits. -A Describe +will no longer be present when the Describe block exits. + A Describe block may contain any number of Context and It blocks. ## EXAMPLES @@ -74,41 +74,26 @@ Using Describe to group tests logically at the root of the script/container ## PARAMETERS -### -Name - -The name of the test group. -This is often an expressive phrase describing -the scenario being tested. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tag +### -AllowNullOrEmptyForEach -Optional parameter containing an array of strings. -When calling Invoke-Pester, -it is possible to specify a -Tag parameter which will only execute Describe blocks -containing the same Tag. +Allows empty or null values for -ForEach when Run.FailOnNullOrEmptyForEach is enabled. +This might be excepted in certain scenarios like using external data. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: Tags - -Required: False -Position: Named -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Fixture @@ -122,75 +107,124 @@ Assertions are typically performed by the Should command within the It blocks. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Skip +### -ForEach -Use this parameter to explicitly mark the block to be skipped. -This is preferable to temporarily -commenting out a block, because it remains listed in the output. +Allows data driven tests to be written. +Takes an array of data and generates one block for each item in the array, and makes the item +available as $_ in all child blocks. +When the array is an array of hashtables, it additionally +defines each key in the hashtable as variable. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -AllowNullOrEmptyForEach +### -Name -Allows empty or null values for -ForEach when Run.FailOnNullOrEmptyForEach is enabled. -This might be excepted in certain scenarios like using external data. +The name of the test group. +This is often an expressive phrase describing +the scenario being tested. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Skip + +Use this parameter to explicitly mark the block to be skipped. +This is preferable to temporarily +commenting out a block, because it remains listed in the output. -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +```yaml +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ForEach +### -Tag -Allows data driven tests to be written. -Takes an array of data and generates one block for each item in the array, and makes the item -available as $_ in all child blocks. -When the array is an array of hashtables, it additionally -defines each key in the hashtable as variable. +Optional parameter containing an array of strings. +When calling Invoke-Pester, +it is possible to specify a -Tag parameter which will only execute Describe blocks +containing the same Tag. ```yaml -Type: Object -Parameter Sets: (All) +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +- Tags +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -200,14 +234,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/Describe](https://pester.dev/docs/commands/Describe) - -[https://pester.dev/docs/usage/test-file-structure](https://pester.dev/docs/usage/test-file-structure) - -[https://pester.dev/docs/usage/mocking](https://pester.dev/docs/usage/mocking) - -[https://pester.dev/docs/usage/testdrive](https://pester.dev/docs/usage/testdrive) +- [https://pester.dev/docs/commands/Describe](https://pester.dev/docs/commands/Describe) +- [https://pester.dev/docs/usage/test-file-structure](https://pester.dev/docs/usage/test-file-structure) +- [https://pester.dev/docs/usage/mocking](https://pester.dev/docs/usage/mocking) +- [https://pester.dev/docs/usage/testdrive](https://pester.dev/docs/usage/testdrive) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Export-JUnitReport.mdx b/docs/commands/Export-JUnitReport.mdx index df9e3822..4f0418ab 100644 --- a/docs/commands/Export-JUnitReport.mdx +++ b/docs/commands/Export-JUnitReport.mdx @@ -23,7 +23,7 @@ Exports a Pester result-object to an JUnit-compatible XML-report ## SYNTAX ```powershell -Export-JUnitReport [-Result] [-Path] [] +Export-JUnitReport [-Result] [-Path] ``` ## DESCRIPTION @@ -53,56 +53,70 @@ exports it as an JUnit 4-compatible XML-report. ## PARAMETERS -### -Result +### -Path -Result object from a Pester-run. -This can be retrieved using Invoke-Pester --Passthru or by using the Run.PassThru configuration-option. +The path where the XML-report should be saved. ```yaml -Type: Run -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Path +### -Result -The path where the XML-report should be saved. +Result object from a Pester-run. +This can be retrieved using Invoke-Pester +-Passthru or by using the Run.PassThru configuration-option. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: Pester.Run +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### Pester.Run + ## OUTPUTS ## NOTES ## RELATED LINKS -[https://pester.dev/docs/commands/Export-JUnitReport](https://pester.dev/docs/commands/Export-JUnitReport) - -[https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) +- [https://pester.dev/docs/commands/Export-JUnitReport](https://pester.dev/docs/commands/Export-JUnitReport) +- [https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Export-NUnitReport.mdx b/docs/commands/Export-NUnitReport.mdx index 455bfdd4..f2537329 100644 --- a/docs/commands/Export-NUnitReport.mdx +++ b/docs/commands/Export-NUnitReport.mdx @@ -23,7 +23,7 @@ Exports a Pester result-object to an NUnit-compatible XML-report ## SYNTAX ```powershell -Export-NUnitReport [-Result] [-Path] [[-Format] ] [] +Export-NUnitReport [-Result] [-Path] [[-Format] ] ``` ## DESCRIPTION @@ -53,22 +53,25 @@ exports it as an NUnit 2.5-compatible XML-report. ## PARAMETERS -### -Result +### -Format -Result object from a Pester-run. -This can be retrieved using Invoke-Pester --Passthru or by using the Run.PassThru configuration-option. +Specifies the NUnit-schema to be used. ```yaml -Type: Run -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.String +DefaultValue: NUnit2.5 +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Path @@ -76,49 +79,65 @@ Accept wildcard characters: False The path where the XML-report should be saved. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Format +### -Result -Specifies the NUnit-schema to be used. +Result object from a Pester-run. +This can be retrieved using Invoke-Pester +-Passthru or by using the Run.PassThru configuration-option. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: NUnit2.5 -Accept pipeline input: False -Accept wildcard characters: False +Type: Pester.Run +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### Pester.Run + ## OUTPUTS ## NOTES ## RELATED LINKS -[https://pester.dev/docs/commands/Export-NUnitReport](https://pester.dev/docs/commands/Export-NUnitReport) - -[https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) +- [https://pester.dev/docs/commands/Export-NUnitReport](https://pester.dev/docs/commands/Export-NUnitReport) +- [https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Get-ShouldOperator.mdx b/docs/commands/Get-ShouldOperator.mdx index 1e89c917..e7f45104 100644 --- a/docs/commands/Get-ShouldOperator.mdx +++ b/docs/commands/Get-ShouldOperator.mdx @@ -23,7 +23,7 @@ Display the assertion operators available for use with Should. ## SYNTAX ```powershell -Get-ShouldOperator [-Name ] [] +Get-ShouldOperator ``` ## DESCRIPTION @@ -60,20 +60,28 @@ Return help examples for the Be assertion operator. Name or alias of operator ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -88,10 +96,9 @@ standard PowerShell discovery patterns (like `Get-Help Should -Parameter *`). ## RELATED LINKS -[https://pester.dev/docs/commands/Get-ShouldOperator](https://pester.dev/docs/commands/Get-ShouldOperator) - -[https://pester.dev/docs/commands/Should](https://pester.dev/docs/commands/Should) +- [https://pester.dev/docs/commands/Get-ShouldOperator](https://pester.dev/docs/commands/Get-ShouldOperator) +- [https://pester.dev/docs/commands/Should](https://pester.dev/docs/commands/Should) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/InModuleScope.mdx b/docs/commands/InModuleScope.mdx index 3d745a78..fba5142e 100644 --- a/docs/commands/InModuleScope.mdx +++ b/docs/commands/InModuleScope.mdx @@ -24,8 +24,8 @@ scope of a PowerShell script or manifest module. ## SYNTAX ```powershell -InModuleScope [-ModuleName] [-ScriptBlock] [[-Parameters] ] - [[-ArgumentList] ] [] +InModuleScope [-ModuleName] [-ScriptBlock] [[-Parameters] ] + [[-ArgumentList] ] ``` ## DESCRIPTION @@ -122,39 +122,49 @@ them in using `-Parameters` or `-ArgumentList`. ## PARAMETERS -### -ModuleName +### -ArgumentList -The name of the module into which the test code should be -injected. -This module must already be loaded into the current -PowerShell session. +A optional list of arguments to be passed to the scriptblock. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object[] +DefaultValue: '@()' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ScriptBlock +### -ModuleName -The code to be executed within the script or manifest module. +The name of the module into which the test code should be +injected. +This module must already be loaded into the current +PowerShell session. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Parameters @@ -163,36 +173,49 @@ A optional hashtable of parameters to be passed to the scriptblock. Parameters are automatically made available as variables in the scriptblock. ```yaml -Type: Hashtable -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: @{} -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Collections.Hashtable +DefaultValue: '@{}' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ArgumentList +### -ScriptBlock -A optional list of arguments to be passed to the scriptblock. +The code to be executed within the script or manifest module. ```yaml -Type: Object[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -202,8 +225,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/InModuleScope](https://pester.dev/docs/commands/InModuleScope) +- [https://pester.dev/docs/commands/InModuleScope](https://pester.dev/docs/commands/InModuleScope) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Invoke-Pester.mdx b/docs/commands/Invoke-Pester.mdx index f6a50027..42e32966 100644 --- a/docs/commands/Invoke-Pester.mdx +++ b/docs/commands/Invoke-Pester.mdx @@ -25,15 +25,15 @@ Runs Pester tests ### Simple (Default) ```powershell -Invoke-Pester [[-Path] ] [-ExcludePath ] [-TagFilter ] - [-ExcludeTagFilter ] [-FullNameFilter ] [-CI] [-Output ] [-PassThru] - [-Container ] [] +Invoke-Pester [[-Path] ] [-ExcludePath ] [-TagFilter ] + [-ExcludeTagFilter ] [-FullNameFilter ] [-CI] [-Output ] [-PassThru] + [-Container ] ``` ### Advanced ```powershell -Invoke-Pester [-Configuration ] [] +Invoke-Pester [-Configuration ] ``` ## DESCRIPTION @@ -121,58 +121,101 @@ to see other testresult options like output path and format and their default v ## PARAMETERS -### -Path +### -CI -Specifies one or more paths to files containing tests. -The value is a path\file -name or name pattern. -Wildcards are permitted. +Enable Test Results and Exit after Run. + +Equivalent to setting: + TestResult.Enabled = $true + Run.Exit = $true + +To also enable CodeCoverage use this configuration option: + CodeCoverage.Enabled = $true ```yaml -Type: String[] -Parameter Sets: Simple -Aliases: - -Required: False -Position: 1 -Default value: . -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ExcludePath +### -Configuration -Specifies one or more paths to exclude from the test run. -Equivalent to ConfigurationProperty Run.ExcludePath. +[PesterConfiguration] object for Advanced Configuration created using `New-PesterConfiguration`. +For help on each option see about_PesterConfiguration or inspect the object. ```yaml -Type: String[] -Parameter Sets: Simple -Aliases: - -Required: False -Position: Named -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: PesterConfiguration +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Advanced + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -TagFilter +### -Container -Specifies tags to include in the test run. -Only tests with matching tags will run. -Equivalent to ConfigurationProperty Filter.Tag. +Specifies one or more ContainerInfo-objects that define containers with tests. +ContainerInfo-objects are generated using New-PesterContainer. +Useful for +scenarios where data-driven test are generated, e.g. +parametrized test files. ```yaml -Type: String[] -Parameter Sets: Simple -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: Pester.ContainerInfo[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -ExcludePath + +Specifies one or more paths to exclude from the test run. +Equivalent to ConfigurationProperty Run.ExcludePath. + +```yaml +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExcludeTagFilter @@ -181,15 +224,20 @@ Specifies tags to exclude from the test run. Equivalent to ConfigurationProperty Filter.ExcludeTag. ```yaml -Type: String[] -Parameter Sets: Simple -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -FullNameFilter @@ -198,38 +246,20 @@ Specifies test full names (including Describe/Context/It path) to run. Equivalent to ConfigurationProperty Filter.FullName. ```yaml -Type: String[] -Parameter Sets: Simple -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CI - -Enable Test Results and Exit after Run. - -Equivalent to setting: - TestResult.Enabled = $true - Run.Exit = $true - -To also enable CodeCoverage use this configuration option: - CodeCoverage.Enabled = $true - -```yaml -Type: SwitchParameter -Parameter Sets: Simple -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Output @@ -241,15 +271,20 @@ Equivalent to ConfigurationProperty Output.Verbosity. Default value is: Normal ```yaml -Type: String -Parameter Sets: Simple -Aliases: - -Required: False -Position: Named -Default value: Normal -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: Normal +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -PassThru @@ -262,57 +297,75 @@ Equivalent to ConfigurationProperty Run.PassThru. To suppress the host output, use the Output parameter with value None. ```yaml -Type: SwitchParameter -Parameter Sets: Simple -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Container +### -Path -Specifies one or more ContainerInfo-objects that define containers with tests. -ContainerInfo-objects are generated using New-PesterContainer. -Useful for -scenarios where data-driven test are generated, e.g. -parametrized test files. +Specifies one or more paths to files containing tests. +The value is a path\file +name or name pattern. +Wildcards are permitted. ```yaml -Type: ContainerInfo[] -Parameter Sets: Simple -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: . +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Simple + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Configuration +### -TagFilter -[PesterConfiguration] object for Advanced Configuration created using `New-PesterConfiguration`. -For help on each option see about_PesterConfiguration or inspect the object. +Specifies tags to include in the test run. +Only tests with matching tags will run. +Equivalent to ConfigurationProperty Filter.Tag. ```yaml -Type: PesterConfiguration -Parameter Sets: Advanced -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -324,10 +377,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) - -[https://pester.dev/docs/quick-start](https://pester.dev/docs/quick-start) +- [https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) +- [https://pester.dev/docs/quick-start](https://pester.dev/docs/quick-start) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/It.mdx b/docs/commands/It.mdx index 0c39ed4e..cb8eaf01 100644 --- a/docs/commands/It.mdx +++ b/docs/commands/It.mdx @@ -25,15 +25,15 @@ Validates the results of a test inside of a Describe block. ### Normal (Default) ```powershell -It [-Name] [[-Test] ] [-ForEach ] [-Tag ] [-AllowNullOrEmptyForEach] - [] +It [-Name] [[-Test] ] [-ForEach ] [-Tag ] + [-AllowNullOrEmptyForEach] ``` ### Skip ```powershell -It [-Name] [[-Test] ] [-ForEach ] [-Tag ] [-Skip] - [-AllowNullOrEmptyForEach] [] +It [-Name] [[-Test] ] [-ForEach ] [-Tag ] [-Skip] + [-AllowNullOrEmptyForEach] ``` ## DESCRIPTION @@ -121,79 +121,75 @@ current hashtable are made available as variables inside It. ## PARAMETERS -### -Name - -An expressive phrase describing the expected test outcome. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Test +### -AllowNullOrEmptyForEach -The script block that should throw an exception if the -expectation of the test is not met.If you are following the -AAA pattern (Arrange-Act-Assert), this typically holds the -Assert. +Allows empty or null values for -ForEach when Run.FailOnNullOrEmptyForEach is enabled. +This might be excepted in certain scenarios like using external data. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ForEach (Formerly called TestCases.) Optional array of hashtable (or any IDictionary) objects. If this parameter is used, Pester will call the test script block once for each table in -the ForEach array, splatting the dictionary to the test script block as input. -If you want +the ForEach array, splatting the dictionary to the test script block as input. + If you want the name of the test to appear differently for each test case, you can embed tokens into the Name parameter with the syntax 'Adds numbers <A> and <B>' (assuming you have keys named A and B in your ForEach hashtables.) ```yaml -Type: Object[] -Parameter Sets: (All) -Aliases: TestCases - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object[] +DefaultValue: '' +SupportsWildcards: false +Aliases: +- TestCases +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Tag +### -Name -Optional parameter containing an array of strings. -When calling Invoke-Pester, -it is possible to include or exclude tests containing the same Tag. +An expressive phrase describing the expected test outcome. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Skip @@ -203,37 +199,75 @@ This is preferable to temporarily commenting out a test, because the test remains listed in the output. ```yaml -Type: SwitchParameter -Parameter Sets: Skip -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Skip + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -AllowNullOrEmptyForEach +### -Tag -Allows empty or null values for -ForEach when Run.FailOnNullOrEmptyForEach is enabled. -This might be excepted in certain scenarios like using external data. +Optional parameter containing an array of strings. +When calling Invoke-Pester, +it is possible to include or exclude tests containing the same Tag. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Test + +The script block that should throw an exception if the +expectation of the test is not met.If you are following the +AAA pattern (Arrange-Act-Assert), this typically holds the +Assert. -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +```yaml +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -243,14 +277,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/It](https://pester.dev/docs/commands/It) - -[https://pester.dev/docs/commands/Describe](https://pester.dev/docs/commands/Describe) - -[https://pester.dev/docs/commands/Context](https://pester.dev/docs/commands/Context) - -[https://pester.dev/docs/commands/Set-ItResult](https://pester.dev/docs/commands/Set-ItResult) +- [https://pester.dev/docs/commands/It](https://pester.dev/docs/commands/It) +- [https://pester.dev/docs/commands/Describe](https://pester.dev/docs/commands/Describe) +- [https://pester.dev/docs/commands/Context](https://pester.dev/docs/commands/Context) +- [https://pester.dev/docs/commands/Set-ItResult](https://pester.dev/docs/commands/Set-ItResult) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Mock.mdx b/docs/commands/Mock.mdx index d374d3a9..adee2588 100644 --- a/docs/commands/Mock.mdx +++ b/docs/commands/Mock.mdx @@ -24,9 +24,9 @@ implementation. ## SYNTAX ```powershell -Mock [[-CommandName] ] [[-MockWith] ] [-Verifiable] [[-ParameterFilter] ] - [[-ModuleName] ] [[-RemoveParameterType] ] [[-RemoveParameterValidation] ] - [] +Mock [[-CommandName] ] [[-MockWith] ] [[-ParameterFilter] ] + [[-ModuleName] ] [[-RemoveParameterType] ] + [[-RemoveParameterValidation] ] [-Verifiable] ``` ## DESCRIPTION @@ -190,15 +190,20 @@ mocked by using the -ModuleName parameter. The name of the command to be mocked. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -MockWith @@ -211,32 +216,45 @@ being mocked, and the MockWith script block can contain references to the mocked commands parameter variables. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: {} -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '{}' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Verifiable +### -ModuleName -When this is set, the mock will be checked when Should -InvokeVerifiable is -called. +Optional string specifying the name of the module where this command +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. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ParameterFilter @@ -249,35 +267,20 @@ This ScriptBlock must return a boolean value. See examples for usage. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ModuleName - -Optional string specifying the name of the module where this command -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. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -RemoveParameterType @@ -289,15 +292,20 @@ type requirements and allows some strongly typed functions to be mocked more easily. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 5 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -RemoveParameterValidation @@ -309,20 +317,50 @@ validation requirements, and allows functions that are strict about their parameter validation to be mocked more easily. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 6 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 5 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Verifiable + +When this is set, the mock will be checked when Should -InvokeVerifiable is +called. + +```yaml +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -332,10 +370,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/Mock](https://pester.dev/docs/commands/Mock) - -[https://pester.dev/docs/usage/mocking](https://pester.dev/docs/usage/mocking) +- [https://pester.dev/docs/commands/Mock](https://pester.dev/docs/commands/Mock) +- [https://pester.dev/docs/usage/mocking](https://pester.dev/docs/usage/mocking) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/New-Fixture.mdx b/docs/commands/New-Fixture.mdx index 02de35bb..7445a921 100644 --- a/docs/commands/New-Fixture.mdx +++ b/docs/commands/New-Fixture.mdx @@ -24,7 +24,7 @@ and another one that contains its tests. ## SYNTAX ```powershell -New-Fixture [-Name] [[-Path] ] [] +New-Fixture [-Name] [[-Path] ] ``` ## DESCRIPTION @@ -90,15 +90,20 @@ Creates a new folder named Cleaner in the current directory and creates the scri Defines the name of the function and the name of the test to be created. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Path @@ -107,20 +112,28 @@ Defines path where the test and the function should be created, you can use full If the parameter is not specified the scripts are created in the current directory. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: $PWD -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: $PWD +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -132,16 +145,12 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/New-Fixture](https://pester.dev/docs/commands/New-Fixture) - -[https://pester.dev/docs/commands/Describe](https://pester.dev/docs/commands/Describe) - -[https://pester.dev/docs/commands/Context](https://pester.dev/docs/commands/Context) - -[https://pester.dev/docs/commands/It](https://pester.dev/docs/commands/It) - -[https://pester.dev/docs/commands/Should](https://pester.dev/docs/commands/Should) +- [https://pester.dev/docs/commands/New-Fixture](https://pester.dev/docs/commands/New-Fixture) +- [https://pester.dev/docs/commands/Describe](https://pester.dev/docs/commands/Describe) +- [https://pester.dev/docs/commands/Context](https://pester.dev/docs/commands/Context) +- [https://pester.dev/docs/commands/It](https://pester.dev/docs/commands/It) +- [https://pester.dev/docs/commands/Should](https://pester.dev/docs/commands/Should) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/New-MockObject.mdx b/docs/commands/New-MockObject.mdx index 49fafb69..84e27308 100644 --- a/docs/commands/New-MockObject.mdx +++ b/docs/commands/New-MockObject.mdx @@ -25,15 +25,15 @@ This function instantiates a .NET object from a type. ### Type (Default) ```powershell -New-MockObject [-Type] [-Properties ] [-Methods ] [-MethodHistoryPrefix ] - [] +New-MockObject [-Type] [-Properties ] [-Methods ] + [-MethodHistoryPrefix ] ``` ### InputObject ```powershell -New-MockObject -InputObject [-Properties ] [-Methods ] - [-MethodHistoryPrefix ] [] +New-MockObject -InputObject [-Properties ] [-Methods ] + [-MethodHistoryPrefix ] ``` ## DESCRIPTION @@ -101,61 +101,53 @@ to mock output using an internal module class. ## PARAMETERS -### -Type - -The .NET type to create. -This creates the object without calling any of its constructors or initializers. -Use this to instantiate an object that does not have a public constructor. -If your object has a constructor, or is giving you errors, try using the constructor and provide the object using the InputObject parameter to decorate it. - -```yaml -Type: Type -Parameter Sets: Type -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -InputObject An already constructed object to decorate. Use `New-Object` or `[typeName]::new()` to create it. ```yaml -Type: Object -Parameter Sets: InputObject -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: InputObject + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Properties +### -MethodHistoryPrefix -Properties to define, specified as a hashtable, in format `@\{ PropertyName = value \}`. +Prefix for the history-property created for each mocked method. +Default is '_' which would create the property '_MethodName'. ```yaml -Type: Hashtable -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: _ +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -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. @@ -164,37 +156,85 @@ Method overloads are not supported because ScriptMethods are used to decorate th For each method a property named `_MethodName` (if using default `-MethodHistoryPrefix`) is defined which holds history of the invocations of the method and the arguments that were provided. ```yaml -Type: Hashtable -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Collections.Hashtable +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: InputObject + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Type + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -MethodHistoryPrefix +### -Properties -Prefix for the history-property created for each mocked method. -Default is '_' which would create the property '_MethodName'. +Properties to define, specified as a hashtable, in format `@{ PropertyName = value }`. + +```yaml +Type: System.Collections.Hashtable +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: InputObject + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Type + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Type + +The .NET type to create. +This creates the object without calling any of its constructors or initializers. +Use this to instantiate an object that does not have a public constructor. +If your object has a constructor, or is giving you errors, try using the constructor and provide the object using the InputObject parameter to decorate it. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: _ -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Type +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Type + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -204,10 +244,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/New-MockObject](https://pester.dev/docs/commands/New-MockObject) - -[https://pester.dev/docs/usage/mocking](https://pester.dev/docs/usage/mocking) +- [https://pester.dev/docs/commands/New-MockObject](https://pester.dev/docs/commands/New-MockObject) +- [https://pester.dev/docs/usage/mocking](https://pester.dev/docs/usage/mocking) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/New-PesterConfiguration.mdx b/docs/commands/New-PesterConfiguration.mdx index dae3d2c5..ff78ccc5 100644 --- a/docs/commands/New-PesterConfiguration.mdx +++ b/docs/commands/New-PesterConfiguration.mdx @@ -23,7 +23,7 @@ Creates a new PesterConfiguration object for advanced configuration of Invoke-Pe ## SYNTAX ```powershell -New-PesterConfiguration [[-Hashtable] ] [] +New-PesterConfiguration [[-Hashtable] ] ``` ## DESCRIPTION @@ -88,20 +88,28 @@ See about_PesterConfiguration help topic or inspect a PesterConfiguration-object available options. ```yaml -Type: IDictionary -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Collections.IDictionary +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -113,12 +121,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/New-PesterConfiguration](https://pester.dev/docs/commands/New-PesterConfiguration) - -[https://pester.dev/docs/usage/Configuration](https://pester.dev/docs/usage/Configuration) - -[https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) +- [https://pester.dev/docs/commands/New-PesterConfiguration](https://pester.dev/docs/commands/New-PesterConfiguration) +- [https://pester.dev/docs/usage/Configuration](https://pester.dev/docs/usage/Configuration) +- [https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/New-PesterContainer.mdx b/docs/commands/New-PesterContainer.mdx index e73b380f..c234b1f9 100644 --- a/docs/commands/New-PesterContainer.mdx +++ b/docs/commands/New-PesterContainer.mdx @@ -25,13 +25,13 @@ Generates ContainerInfo-objects used as for Invoke-Pester -Container ### Path (Default) ```powershell -New-PesterContainer -Path [-Data ] [] +New-PesterContainer -Path [-Data ] ``` ### ScriptBlock ```powershell -New-PesterContainer -ScriptBlock [-Data ] [] +New-PesterContainer -ScriptBlock [-Data ] ``` ## DESCRIPTION @@ -80,6 +80,28 @@ the required ContainerInfo-object that enables us to do this directly. ## PARAMETERS +### -Data + +Allows a dictionary to be provided with parameter-values that should be used during +execution of the test containers defined in Path or ScriptBlock. + +```yaml +Type: System.Collections.IDictionary[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + ### -Path Specifies one or more paths to files containing tests. @@ -88,15 +110,20 @@ name or name pattern. Wildcards are permitted. ```yaml -Type: String[] -Parameter Sets: Path -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Path + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ScriptBlock @@ -104,37 +131,28 @@ Accept wildcard characters: False Specifies one or more scriptblocks containing tests. ```yaml -Type: ScriptBlock[] -Parameter Sets: ScriptBlock -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Data - -Allows a dictionary to be provided with parameter-values that should be used during -execution of the test containers defined in Path or ScriptBlock. - -```yaml -Type: IDictionary[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: ScriptBlock + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -146,12 +164,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/New-PesterContainer](https://pester.dev/docs/commands/New-PesterContainer) - -[https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) - -[https://pester.dev/docs/usage/data-driven-tests](https://pester.dev/docs/usage/data-driven-tests) +- [https://pester.dev/docs/commands/New-PesterContainer](https://pester.dev/docs/commands/New-PesterContainer) +- [https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) +- [https://pester.dev/docs/usage/data-driven-tests](https://pester.dev/docs/usage/data-driven-tests) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Set-ItResult.mdx b/docs/commands/Set-ItResult.mdx index eaedd122..f674cf81 100644 --- a/docs/commands/Set-ItResult.mdx +++ b/docs/commands/Set-ItResult.mdx @@ -25,13 +25,13 @@ Set-ItResult is used inside the It block to explicitly set the test result ### Inconclusive ```powershell -Set-ItResult [-Inconclusive] [-Because ] [] +Set-ItResult [-Inconclusive] [-Because ] ``` ### Skipped ```powershell -Set-ItResult [-Skipped] [-Because ] [] +Set-ItResult [-Skipped] [-Because ] ``` ## DESCRIPTION @@ -58,7 +58,7 @@ Describe "Example" { the output should be -```powershell +``` Describing Example [?] Inconclusive test is inconclusive, because we want it to be inconclusive 35ms [!] Skipped test is skipped, because we want it to be skipped 3ms @@ -68,21 +68,49 @@ Tests Passed: 0, Failed: 0, Skipped: 1, Inconclusive: 1, NotRun: 0 ## PARAMETERS +### -Because + +Similarly to failing tests, skipped and inconclusive tests should have reason. +It allows +to provide information to the user why the test is neither successful nor failed. + +```yaml +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + ### -Inconclusive Sets the test result to inconclusive. Cannot be used at the same time as -Skipped ```yaml -Type: SwitchParameter -Parameter Sets: Inconclusive -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Inconclusive + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Skipped @@ -91,38 +119,28 @@ Sets the test result to skipped. Cannot be used at the same time as -Inconclusive. ```yaml -Type: SwitchParameter -Parameter Sets: Skipped -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Because - -Similarly to failing tests, skipped and inconclusive tests should have reason. -It allows -to provide information to the user why the test is neither successful nor failed. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Skipped + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -132,8 +150,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/Set-ItResult](https://pester.dev/docs/commands/Set-ItResult) +- [https://pester.dev/docs/commands/Set-ItResult](https://pester.dev/docs/commands/Set-ItResult) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-All.mdx b/docs/commands/Should-All.mdx index c9c8126a..d3bc82a0 100644 --- a/docs/commands/Should-All.mdx +++ b/docs/commands/Should-All.mdx @@ -18,13 +18,12 @@ Contributions are welcome in [Pester-repo](https://github.com/pester/pester). ## SYNOPSIS -Compares all items in a collection to a filter script. -If the filter returns true, or does not throw for all the items in the collection, the assertion passes. +Compares all items in a collection to a filter script. If the filter returns true, or does not throw for all the items in the collection, the assertion passes. ## SYNTAX ```powershell -Should-All [[-Actual] ] [-FilterScript] [-Because ] [] +Should-All [-FilterScript] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -59,56 +58,76 @@ The assertions will fail because not all items in the array are greater than 1. A collection of items to filter. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -FilterScript +### -Because -A script block that filters the input collection. -The script block can use Should-* assertions or throw exceptions to indicate failure. +The reason why the input should be the expected value. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -FilterScript -The reason why the input should be the expected value. +A script block that filters the input collection. +The script block can use Should-* assertions or throw exceptions to indicate failure. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -121,10 +140,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-All](https://pester.dev/docs/commands/Should-All) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-All](https://pester.dev/docs/commands/Should-All) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-Any.mdx b/docs/commands/Should-Any.mdx index 6dd665d2..fa4743b1 100644 --- a/docs/commands/Should-Any.mdx +++ b/docs/commands/Should-Any.mdx @@ -18,13 +18,12 @@ Contributions are welcome in [Pester-repo](https://github.com/pester/pester). ## SYNOPSIS -Compares all items in a collection to a filter script. -If the filter returns true, or does not throw for any of the items in the collection, the assertion passes. +Compares all items in a collection to a filter script. If the filter returns true, or does not throw for any of the items in the collection, the assertion passes. ## SYNTAX ```powershell -Should-Any [[-Actual] ] [-FilterScript] [-Because ] [] +Should-Any [-FilterScript] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -60,56 +59,76 @@ The assertions will fail because none of theitems in the array are greater than A collection of items to filter. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -FilterScript +### -Because -A script block that filters the input collection. -The script block can use Should-* assertions or throw exceptions to indicate failure. +The reason why the input should be the expected value. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -FilterScript -The reason why the input should be the expected value. +A script block that filters the input collection. +The script block can use Should-* assertions or throw exceptions to indicate failure. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -122,10 +141,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-Any](https://pester.dev/docs/commands/Should-Any) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-Any](https://pester.dev/docs/commands/Should-Any) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-Be.mdx b/docs/commands/Should-Be.mdx index b7ffb3ac..84cc230d 100644 --- a/docs/commands/Should-Be.mdx +++ b/docs/commands/Should-Be.mdx @@ -23,7 +23,7 @@ Compares the expected value to actual value, to see if they are equal. ## SYNTAX ```powershell -Should-Be [[-Actual] ] [-Expected] [-Because ] [] +Should-Be [-Expected] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -49,55 +49,75 @@ These assertions will pass, because the expected value is equal to the actual va The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected value. +The reason why the input should be the expected value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the input should be the expected value. +The expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -110,10 +130,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-Be](https://pester.dev/docs/commands/Should-Be) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-Be](https://pester.dev/docs/commands/Should-Be) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeAfter.mdx b/docs/commands/Should-BeAfter.mdx index 97856468..a7b73271 100644 --- a/docs/commands/Should-BeAfter.mdx +++ b/docs/commands/Should-BeAfter.mdx @@ -25,25 +25,25 @@ Asserts that the provided [datetime] is after the expected [datetime]. ### Now (Default) ```powershell -Should-BeAfter [[-Actual] ] [-Now] [-Because ] [] +Should-BeAfter [[-Actual] ] [-Now] [-Because ] ``` ### FluentFromNow ```powershell -Should-BeAfter [[-Actual] ] [[-Time] ] [-FromNow] [-Because ] [] +Should-BeAfter [[-Time] ] [[-Actual] ] -FromNow [-Because ] ``` ### FluentAgo ```powershell -Should-BeAfter [[-Actual] ] [[-Time] ] [-Ago] [-Because ] [] +Should-BeAfter [[-Time] ] [[-Actual] ] -Ago [-Because ] ``` ### Expected ```powershell -Should-BeAfter [[-Actual] ] [[-Expected] ] [-Because ] [] +Should-BeAfter [[-Expected] ] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -92,65 +92,83 @@ This assertion will pass, because the actual value is after the expected value. The actual [datetime] value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Now +### -Ago -Indicates that the current time should be used as the expected time. +Indicates that the -Time should be subtracted from the current time. ```yaml -Type: SwitchParameter -Parameter Sets: Now -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FluentAgo + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Time +### -Because -The time to add or subtract from the current time. -This parameter uses fluent time syntax e.g. -1minute. +The reason why the actual value should be after the expected value. ```yaml -Type: String -Parameter Sets: FluentFromNow, FluentAgo -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Ago +### -Expected -Indicates that the -Time should be subtracted from the current time. +The expected [datetime] value. ```yaml -Type: SwitchParameter -Parameter Sets: FluentAgo -Aliases: - -Required: True -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.DateTime +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Expected + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -FromNow @@ -158,55 +176,83 @@ Accept wildcard characters: False Indicates that the -Time should be added to the current time. ```yaml -Type: SwitchParameter -Parameter Sets: FluentFromNow -Aliases: - -Required: True -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FluentFromNow + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Now -The expected [datetime] value. +Indicates that the current time should be used as the expected time. ```yaml -Type: DateTime -Parameter Sets: Expected -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Now + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Time -The reason why the actual value should be after the expected value. +The time to add or subtract from the current time. +This parameter uses fluent time syntax e.g. +1minute. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FluentFromNow + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FluentAgo + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -221,10 +267,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeAfter](https://pester.dev/docs/commands/Should-BeAfter) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeAfter](https://pester.dev/docs/commands/Should-BeAfter) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeBefore.mdx b/docs/commands/Should-BeBefore.mdx index ad383d62..a44fc34f 100644 --- a/docs/commands/Should-BeBefore.mdx +++ b/docs/commands/Should-BeBefore.mdx @@ -25,25 +25,25 @@ Asserts that the provided [datetime] is before the expected [datetime]. ### Now (Default) ```powershell -Should-BeBefore [[-Actual] ] [-Now] [-Because ] [] +Should-BeBefore [[-Actual] ] [-Now] [-Because ] ``` ### FluentFromNow ```powershell -Should-BeBefore [[-Actual] ] [[-Time] ] [-FromNow] [-Because ] [] +Should-BeBefore [[-Time] ] [[-Actual] ] -FromNow [-Because ] ``` ### FluentAgo ```powershell -Should-BeBefore [[-Actual] ] [[-Time] ] [-Ago] [-Because ] [] +Should-BeBefore [[-Time] ] [[-Actual] ] -Ago [-Because ] ``` ### Expected ```powershell -Should-BeBefore [[-Actual] ] [[-Expected] ] [-Because ] [] +Should-BeBefore [[-Expected] ] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -92,65 +92,83 @@ This assertion will pass, because the actual value is before the expected value. The actual [datetime] value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Now +### -Ago -Indicates that the current time should be used as the expected time. +Indicates that the -Time should be subtracted from the current time. ```yaml -Type: SwitchParameter -Parameter Sets: Now -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FluentAgo + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Time +### -Because -The time to add or subtract from the current time. -This parameter uses fluent time syntax e.g. -1minute. +The reason why the actual value should be before the expected value. ```yaml -Type: String -Parameter Sets: FluentFromNow, FluentAgo -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Ago +### -Expected -Indicates that the -Time should be subtracted from the current time. +The expected [datetime] value. ```yaml -Type: SwitchParameter -Parameter Sets: FluentAgo -Aliases: - -Required: True -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.DateTime +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Expected + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -FromNow @@ -158,55 +176,83 @@ Accept wildcard characters: False Indicates that the -Time should be added to the current time. ```yaml -Type: SwitchParameter -Parameter Sets: FluentFromNow -Aliases: - -Required: True -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FluentFromNow + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Now -The expected [datetime] value. +Indicates that the current time should be used as the expected time. ```yaml -Type: DateTime -Parameter Sets: Expected -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Now + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Time -The reason why the actual value should be before the expected value. +The time to add or subtract from the current time. +This parameter uses fluent time syntax e.g. +1minute. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FluentFromNow + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FluentAgo + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -221,10 +267,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeBefore](https://pester.dev/docs/commands/Should-BeBefore) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeBefore](https://pester.dev/docs/commands/Should-BeBefore) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeCollection.mdx b/docs/commands/Should-BeCollection.mdx index d5b3eac9..4846453b 100644 --- a/docs/commands/Should-BeCollection.mdx +++ b/docs/commands/Should-BeCollection.mdx @@ -18,21 +18,20 @@ Contributions are welcome in [Pester-repo](https://github.com/pester/pester). ## SYNOPSIS -Compares collections for equality, by comparing their sizes and each item in them. -It does not compare the types of the input collections. +Compares collections for equality, by comparing their sizes and each item in them. It does not compare the types of the input collections. ## SYNTAX ### Expected ```powershell -Should-BeCollection [[-Actual] ] [-Expected] [-Because ] [] +Should-BeCollection [-Expected] [[-Actual] ] [-Because ] ``` ### Count ```powershell -Should-BeCollection [[-Actual] ] [-Because ] [-Count ] [] +Should-BeCollection [[-Actual] ] [-Because ] [-Count ] ``` ## DESCRIPTION @@ -70,71 +69,96 @@ The assertions will fail because the collections are not equal. A collection of items. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -A collection of items. +The reason why the input should be the expected value. ```yaml -Type: Object -Parameter Sets: Expected -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Count -The reason why the input should be the expected value. +Checks if the collection has the expected number of items. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Int32 +DefaultValue: 0 +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Count + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Count +### -Expected -Checks if the collection has the expected number of items. +A collection of items. ```yaml -Type: Int32 -Parameter Sets: Count -Aliases: - -Required: False -Position: Named -Default value: 0 -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Expected + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -147,10 +171,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeCollection](https://pester.dev/docs/commands/Should-BeCollection) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeCollection](https://pester.dev/docs/commands/Should-BeCollection) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeEmptyString.mdx b/docs/commands/Should-BeEmptyString.mdx index 9a6512ae..78e11771 100644 --- a/docs/commands/Should-BeEmptyString.mdx +++ b/docs/commands/Should-BeEmptyString.mdx @@ -23,7 +23,7 @@ Ensures that input is an empty string. ## SYNTAX ```powershell -Should-BeEmptyString [[-Actual] ] [-Because ] [] +Should-BeEmptyString [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -69,15 +69,20 @@ All the tests above will fail, the input is not a string. The actual value that will be compared to an empty string. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Because @@ -85,23 +90,33 @@ Accept wildcard characters: False The reason why the input should be an empty string. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -114,10 +129,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeEmptyString](https://pester.dev/docs/commands/Should-BeEmptyString) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeEmptyString](https://pester.dev/docs/commands/Should-BeEmptyString) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeEquivalent.mdx b/docs/commands/Should-BeEquivalent.mdx index 0221f46d..36aab66a 100644 --- a/docs/commands/Should-BeEquivalent.mdx +++ b/docs/commands/Should-BeEquivalent.mdx @@ -23,8 +23,8 @@ Compares two objects for equivalency, by recursively comparing their properties ## SYNTAX ```powershell -Should-BeEquivalent [[-Actual] ] [-Expected] [-Because ] [-ExcludePath ] - [-ExcludePathsNotOnExpected] [-Comparator ] [] +Should-BeEquivalent [-Expected] [[-Actual] ] [-Because ] + [-ExcludePath ] [-ExcludePathsNotOnExpected] [-Comparator ] ``` ## DESCRIPTION @@ -45,8 +45,10 @@ This example generates an equivalency option object that excludes the 'Id' and ' ### EXAMPLE 2 ```powershell +```powereshell Should-BeEquivalent ... -ExcludePathsNotOnExpected ``` +``` This example generates an equivalency option object that excludes any paths not present on the expected object from the comparison, using the default deep comparison strategy. @@ -90,47 +92,64 @@ This will pass because the actual object has the same properties as the expected The actual object to compare. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected object to compare. +The reason why the input should be the expected value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Comparator -The reason why the input should be the expected value. +Specifies the comparison strategy to use. +The options are 'Equivalency' for a deep comparison that considers the structure and values of objects, and 'Equality' for a simple equality comparison. +The default is 'Equivalency'. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: Equivalency +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExcludePath @@ -140,15 +159,20 @@ Each path should correspond to a property name or a chain of property names sepa The paths use dot notation to navigate to a child property, such as "user.name". ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExcludePathsNotOnExpected @@ -157,41 +181,54 @@ A switch parameter that, when set, excludes any paths from the comparison that a This is useful for ignoring extra properties on the actual object that are not relevant to the comparison. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Comparator +### -Expected -Specifies the comparison strategy to use. -The options are 'Equivalency' for a deep comparison that considers the structure and values of objects, and 'Equality' for a simple equality comparison. -The default is 'Equivalency'. +The expected object to compare. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: Equivalency -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -204,10 +241,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeEquivalent](https://pester.dev/docs/commands/Should-BeEquivalent) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeEquivalent](https://pester.dev/docs/commands/Should-BeEquivalent) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeFalse.mdx b/docs/commands/Should-BeFalse.mdx index f5e7b7f9..d1049cbf 100644 --- a/docs/commands/Should-BeFalse.mdx +++ b/docs/commands/Should-BeFalse.mdx @@ -18,13 +18,12 @@ Contributions are welcome in [Pester-repo](https://github.com/pester/pester). ## SYNOPSIS -Compares the actual value to a boolean $false. -It does not convert input values to boolean, and will fail for any value that is not $false. +Compares the actual value to a boolean $false. It does not convert input values to boolean, and will fail for any value that is not $false. ## SYNTAX ```powershell -Should-BeFalse [[-Actual] ] [[-Because] ] [] +Should-BeFalse [[-Actual] ] [[-Because] ] ``` ## DESCRIPTION @@ -62,15 +61,20 @@ All of these assertions will fail, because the actual value is not $false. The actual value to compare to $false. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Because @@ -78,23 +82,33 @@ Accept wildcard characters: False The reason why the input should be the expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -109,10 +123,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeFalse](https://pester.dev/docs/commands/Should-BeFalse) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeFalse](https://pester.dev/docs/commands/Should-BeFalse) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeFalsy.mdx b/docs/commands/Should-BeFalsy.mdx index 3e6dae45..9a1c31b8 100644 --- a/docs/commands/Should-BeFalsy.mdx +++ b/docs/commands/Should-BeFalsy.mdx @@ -18,13 +18,12 @@ Contributions are welcome in [Pester-repo](https://github.com/pester/pester). ## SYNOPSIS -Compares the actual value to a boolean $false or a falsy value: 0, "", $null or @(). -It converts the input value to a boolean. +Compares the actual value to a boolean $false or a falsy value: 0, "", $null or @(). It converts the input value to a boolean. ## SYNTAX ```powershell -Should-BeFalsy [[-Actual] ] [[-Because] ] [] +Should-BeFalsy [[-Actual] ] [[-Because] ] ``` ## DESCRIPTION @@ -62,15 +61,20 @@ These assertions will fail, because the actual value is not $false or falsy. The actual value to compare to $false. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Because @@ -78,23 +82,33 @@ Accept wildcard characters: False The reason why the input should be the expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -109,10 +123,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeFalsy](https://pester.dev/docs/commands/Should-BeFalsy) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeFalsy](https://pester.dev/docs/commands/Should-BeFalsy) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeFasterThan.mdx b/docs/commands/Should-BeFasterThan.mdx index e2c4bc98..150a2780 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 [[-Expected] ] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -56,55 +56,75 @@ This assertion will fail, because the actual value is not faster than the expect The actual [timespan] or [scriptblock] value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected [timespan] or fluent time value. +The reason why the actual value should be faster than the expected value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the actual value should be faster than the expected value. +The expected [timespan] or fluent time value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -119,10 +139,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeFasterThan](https://pester.dev/docs/commands/Should-BeFasterThan) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeFasterThan](https://pester.dev/docs/commands/Should-BeFasterThan) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeGreaterThan.mdx b/docs/commands/Should-BeGreaterThan.mdx index bdddb0a9..52d36fb0 100644 --- a/docs/commands/Should-BeGreaterThan.mdx +++ b/docs/commands/Should-BeGreaterThan.mdx @@ -23,7 +23,7 @@ Compares the expected value to actual value, to see if the actual value is great ## SYNTAX ```powershell -Should-BeGreaterThan [[-Actual] ] [-Expected] [-Because ] [] +Should-BeGreaterThan [-Expected] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -48,55 +48,75 @@ These assertions will pass, because the actual value is greater than the expecte The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected value. +The reason why the input should be the expected value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the input should be the expected value. +The expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -109,10 +129,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeGreaterThan](https://pester.dev/docs/commands/Should-BeGreaterThan) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeGreaterThan](https://pester.dev/docs/commands/Should-BeGreaterThan) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeGreaterThanOrEqual.mdx b/docs/commands/Should-BeGreaterThanOrEqual.mdx index f696c922..ef637145 100644 --- a/docs/commands/Should-BeGreaterThanOrEqual.mdx +++ b/docs/commands/Should-BeGreaterThanOrEqual.mdx @@ -23,7 +23,7 @@ Compares the expected value to actual value, to see if the actual value is great ## SYNTAX ```powershell -Should-BeGreaterThanOrEqual [[-Actual] ] [-Expected] [-Because ] [] +Should-BeGreaterThanOrEqual [-Expected] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -48,55 +48,75 @@ These assertions will pass, because the actual value is greater than or equal to The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected value. +The reason why the input should be the expected value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the input should be the expected value. +The expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -109,10 +129,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeGreaterThanOrEqual](https://pester.dev/docs/commands/Should-BeGreaterThanOrEqual) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeGreaterThanOrEqual](https://pester.dev/docs/commands/Should-BeGreaterThanOrEqual) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeHashtable.mdx b/docs/commands/Should-BeHashtable.mdx index aad1b61c..64e9943f 100644 --- a/docs/commands/Should-BeHashtable.mdx +++ b/docs/commands/Should-BeHashtable.mdx @@ -24,23 +24,23 @@ entries, whether it is ordered, and that it contains specific keys. ## SYNTAX ```powershell -Should-BeHashtable [[-Actual] ] [-Count ] [-Key ] [-Ordered] [-Because ] - [] +Should-BeHashtable [[-Actual] ] [-Count ] [-Key ] [-Ordered] + [-Because ] ``` ## DESCRIPTION `Should-BeHashtable` is a shape assertion. It verifies that `$Actual` is a hashtable or -dictionary (anything implementing `System.Collections.IDictionary`, such as `@\{\}`, -`[ordered]@\{\}` or a generic `Dictionary[,]`). +dictionary (anything implementing `System.Collections.IDictionary`, such as `@{}`, +`[ordered]@{}` or a generic `Dictionary[,]`). It does not compare the contents of the dictionary. Use the optional parameters to assert on the shape of the dictionary: - `-Count` checks the number of entries. -- `-Ordered` checks that the value is an ordered dictionary (`[ordered]@\{\}`). +- `-Ordered` checks that the value is an ordered dictionary (`[ordered]@{}`). - `-Key` checks that the given keys are present, ignoring their values. When combined with `-Ordered`, the keys must also appear in the given relative order. @@ -90,15 +90,41 @@ The value to test. It is expected to be a hashtable or dictionary. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Because + +The reason why the input should be a hashtable with the expected shape. + +```yaml +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Count @@ -106,15 +132,20 @@ Accept wildcard characters: False Checks that the dictionary has the expected number of entries. ```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: 0 -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Int32 +DefaultValue: 0 +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Key @@ -126,57 +157,56 @@ When `-Ordered` is also specified, the keys must appear in the dictionary in the same relative order as they are listed here. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Ordered Checks that the dictionary is an ordered dictionary (`System.Collections.Specialized.OrderedDictionary`), -as produced by `[ordered]@\{\}`. +as produced by `[ordered]@{}`. A plain `[hashtable]` is unordered and fails this check. ```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 a hashtable with the expected shape. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -193,10 +223,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeHashtable](https://pester.dev/docs/commands/Should-BeHashtable) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeHashtable](https://pester.dev/docs/commands/Should-BeHashtable) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeLessThan.mdx b/docs/commands/Should-BeLessThan.mdx index 798945a3..d508a1a1 100644 --- a/docs/commands/Should-BeLessThan.mdx +++ b/docs/commands/Should-BeLessThan.mdx @@ -23,7 +23,7 @@ Compares the expected value to actual value, to see if the actual value is less ## SYNTAX ```powershell -Should-BeLessThan [[-Actual] ] [-Expected] [-Because ] [] +Should-BeLessThan [-Expected] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -48,55 +48,75 @@ These assertions will pass, because the actual value is less than the expected v The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected value. +The reason why the input should be the expected value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the input should be the expected value. +The expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -109,10 +129,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeLessThan](https://pester.dev/docs/commands/Should-BeLessThan) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeLessThan](https://pester.dev/docs/commands/Should-BeLessThan) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeLessThanOrEqual.mdx b/docs/commands/Should-BeLessThanOrEqual.mdx index 33414ae2..db9b456f 100644 --- a/docs/commands/Should-BeLessThanOrEqual.mdx +++ b/docs/commands/Should-BeLessThanOrEqual.mdx @@ -23,7 +23,7 @@ Compares the expected value to actual value, to see if the actual value is less ## SYNTAX ```powershell -Should-BeLessThanOrEqual [[-Actual] ] [-Expected] [-Because ] [] +Should-BeLessThanOrEqual [-Expected] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -56,55 +56,75 @@ This assertion will fail, because the actual value is not less than or equal to The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected value. +The reason why the input should be the expected value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the input should be the expected value. +The expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -119,10 +139,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeLessThanOrEqual](https://pester.dev/docs/commands/Should-BeLessThanOrEqual) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeLessThanOrEqual](https://pester.dev/docs/commands/Should-BeLessThanOrEqual) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeLikeString.mdx b/docs/commands/Should-BeLikeString.mdx index 2f1bb714..02c32396 100644 --- a/docs/commands/Should-BeLikeString.mdx +++ b/docs/commands/Should-BeLikeString.mdx @@ -23,8 +23,7 @@ Asserts that the actual value is like the expected value. ## SYNTAX ```powershell -Should-BeLikeString [[-Actual] ] [-Expected] [-CaseSensitive] [-Because ] - [] +Should-BeLikeString [-Expected] [[-Actual] ] [-CaseSensitive] [-Because ] ``` ## DESCRIPTION @@ -57,31 +56,41 @@ This assertion will fail, because the actual value is not like the expected valu The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected value. +The reason why the actual value should be like the expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CaseSensitive @@ -89,39 +98,54 @@ Accept wildcard characters: False Indicates that the comparison should be case-sensitive. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the actual value should be like the expected value. +The expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -136,10 +160,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeLikeString](https://pester.dev/docs/commands/Should-BeLikeString) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeLikeString](https://pester.dev/docs/commands/Should-BeLikeString) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeNull.mdx b/docs/commands/Should-BeNull.mdx index 9f853ac3..b78c7961 100644 --- a/docs/commands/Should-BeNull.mdx +++ b/docs/commands/Should-BeNull.mdx @@ -23,7 +23,7 @@ Asserts that the input is `$null`. ## SYNTAX ```powershell -Should-BeNull [[-Actual] ] [-Because ] [] +Should-BeNull [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -48,15 +48,20 @@ This assertion will pass, because the actual value is `$null`. The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Because @@ -64,23 +69,33 @@ Accept wildcard characters: False The reason why the input should be `$null`. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -93,10 +108,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeNull](https://pester.dev/docs/commands/Should-BeNull) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeNull](https://pester.dev/docs/commands/Should-BeNull) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeSame.mdx b/docs/commands/Should-BeSame.mdx index d341247d..ef646742 100644 --- a/docs/commands/Should-BeSame.mdx +++ b/docs/commands/Should-BeSame.mdx @@ -23,7 +23,7 @@ Compares the expected value to actual value, to see if they are the same instanc ## SYNTAX ```powershell -Should-BeSame [[-Actual] ] [-Expected] [-Because ] [] +Should-BeSame [-Expected] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -59,55 +59,75 @@ This assertion will fail, because the actual value is not the same instance as t The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected value. +The reason why the input should be the expected value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the input should be the expected value. +The expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -122,10 +142,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeSame](https://pester.dev/docs/commands/Should-BeSame) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeSame](https://pester.dev/docs/commands/Should-BeSame) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeSlowerThan.mdx b/docs/commands/Should-BeSlowerThan.mdx index d7809030..2991baae 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 [[-Expected] ] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -64,55 +64,75 @@ This assertion will fail, because the actual value is not slower than the expect The actual [timespan] or [scriptblock] value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected [timespan] or fluent time value. +The reason why the actual value should be slower than the expected value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the actual value should be slower than the expected value. +The expected [timespan] or fluent time value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -127,10 +147,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeSlowerThan](https://pester.dev/docs/commands/Should-BeSlowerThan) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeSlowerThan](https://pester.dev/docs/commands/Should-BeSlowerThan) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeString.mdx b/docs/commands/Should-BeString.mdx index c12baf49..b26c4850 100644 --- a/docs/commands/Should-BeString.mdx +++ b/docs/commands/Should-BeString.mdx @@ -23,8 +23,8 @@ Asserts that the actual value is equal to the expected value. ## SYNTAX ```powershell -Should-BeString [[-Actual] ] [-Expected] [-Because ] [-CaseSensitive] - [-IgnoreWhitespace] [-TrimWhitespace] [] +Should-BeString [-Expected] [[-Actual] ] [-Because ] [-CaseSensitive] + [-IgnoreWhitespace] [-TrimWhitespace] ``` ## DESCRIPTION @@ -57,63 +57,83 @@ This assertion will fail, because the actual value is not equal to the expected The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected value. +The reason why the actual value should be equal to the expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -CaseSensitive -The reason why the actual value should be equal to the expected value. +Indicates that the comparison should be case-sensitive. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -CaseSensitive +### -Expected -Indicates that the comparison should be case-sensitive. +The expected value. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -IgnoreWhitespace @@ -121,15 +141,20 @@ Accept wildcard characters: False Indicates that the comparison should ignore whitespace. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -TrimWhitespace @@ -137,23 +162,33 @@ Accept wildcard characters: False 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 +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -168,10 +203,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeString](https://pester.dev/docs/commands/Should-BeString) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeString](https://pester.dev/docs/commands/Should-BeString) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeTrue.mdx b/docs/commands/Should-BeTrue.mdx index 3306d80c..f6c3ff1f 100644 --- a/docs/commands/Should-BeTrue.mdx +++ b/docs/commands/Should-BeTrue.mdx @@ -18,13 +18,12 @@ Contributions are welcome in [Pester-repo](https://github.com/pester/pester). ## SYNOPSIS -Compares the actual value to a boolean $true. -It does not convert input values to boolean, and will fail for any value is not $true. +Compares the actual value to a boolean $true. It does not convert input values to boolean, and will fail for any value is not $true. ## SYNTAX ```powershell -Should-BeTrue [[-Actual] ] [[-Because] ] [] +Should-BeTrue [[-Actual] ] [[-Because] ] ``` ## DESCRIPTION @@ -62,15 +61,20 @@ All of these assertions will fail, because the actual value is not $true. The actual value to compare to $true. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Because @@ -78,23 +82,33 @@ Accept wildcard characters: False The reason why the input should be the expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -109,10 +123,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeTrue](https://pester.dev/docs/commands/Should-BeTrue) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeTrue](https://pester.dev/docs/commands/Should-BeTrue) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeTruthy.mdx b/docs/commands/Should-BeTruthy.mdx index b959914d..b9ce2c4c 100644 --- a/docs/commands/Should-BeTruthy.mdx +++ b/docs/commands/Should-BeTruthy.mdx @@ -18,13 +18,12 @@ Contributions are welcome in [Pester-repo](https://github.com/pester/pester). ## SYNOPSIS -Compares the actual value to a boolean $true. -It converts input values to boolean, and will fail for any value is not $true, or truthy. +Compares the actual value to a boolean $true. It converts input values to boolean, and will fail for any value is not $true, or truthy. ## SYNTAX ```powershell -Should-BeTruthy [[-Actual] ] [[-Because] ] [] +Should-BeTruthy [[-Actual] ] [[-Because] ] ``` ## DESCRIPTION @@ -63,15 +62,20 @@ All of these assertions will fail, because the actual value is not $true or trut The actual value to compare to $true. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Because @@ -79,23 +83,33 @@ Accept wildcard characters: False The reason why the input should be the expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -110,10 +124,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeTruthy](https://pester.dev/docs/commands/Should-BeTruthy) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeTruthy](https://pester.dev/docs/commands/Should-BeTruthy) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-ContainCollection.mdx b/docs/commands/Should-ContainCollection.mdx index 899d7e4c..b621d87f 100644 --- a/docs/commands/Should-ContainCollection.mdx +++ b/docs/commands/Should-ContainCollection.mdx @@ -18,13 +18,12 @@ Contributions are welcome in [Pester-repo](https://github.com/pester/pester). ## SYNOPSIS -Checks that the expected collection is present in the actual collection as an ordered subsequence. -It does not compare the types of the input collections. +Checks that the expected collection is present in the actual collection as an ordered subsequence. It does not compare the types of the input collections. ## SYNTAX ```powershell -Should-ContainCollection [[-Actual] ] [-Expected] [-Because ] [] +Should-ContainCollection [-Expected] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -66,56 +65,76 @@ These assertions fail, because an expected item is missing (`@(3, 4)`), the item The collection to search in. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -One or more items to look for as an ordered subsequence. -A single value is treated as a one-item collection. +The reason why the input should be the expected value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the input should be the expected value. +One or more items to look for as an ordered subsequence. +A single value is treated as a one-item collection. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -128,10 +147,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-ContainCollection](https://pester.dev/docs/commands/Should-ContainCollection) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-ContainCollection](https://pester.dev/docs/commands/Should-ContainCollection) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-HaveParameter.mdx b/docs/commands/Should-HaveParameter.mdx index 3a3c582f..35080107 100644 --- a/docs/commands/Should-HaveParameter.mdx +++ b/docs/commands/Should-HaveParameter.mdx @@ -23,9 +23,9 @@ Asserts that a command has the expected parameter. ## SYNTAX ```powershell -Should-HaveParameter [[-ParameterName] ] [[-Type] ] [[-DefaultValue] ] [-Mandatory] - [[-InParameterSet] ] [-HasArgumentCompleter] [[-Alias] ] [[-Actual] ] - [[-Because] ] [] +Should-HaveParameter [[-ParameterName] ] [[-Type] ] [[-DefaultValue] ] + [[-InParameterSet] ] [[-Alias] ] [[-Actual] ] [[-Because] ] + [-Mandatory] [-HasArgumentCompleter] ``` ## DESCRIPTION @@ -84,40 +84,69 @@ This assertion passes, because the `-Index` parameter (from the `Get-Cat` functi ## PARAMETERS -### -ParameterName +### -Actual -The name of the parameter to check. +The actual command to check. E.g. -Uri +Get-Command "Invoke-WebRequest" ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 5 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Type +### -Alias -The type of the parameter to check. -E.g. -[string] +The alias of the parameter to check. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Because + +The reason why the input should be the expected value. + +```yaml +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 6 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -DefaultValue @@ -127,31 +156,41 @@ E.g. "https://example.com" ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Mandatory +### -HasArgumentCompleter -Whether the parameter is mandatory or not. +Whether the parameter has an argument completer or not. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -InParameterSet @@ -159,89 +198,100 @@ Accept wildcard characters: False The parameter set that the parameter belongs to. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HasArgumentCompleter - -Whether the parameter has an argument completer or not. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Alias +### -Mandatory -The alias of the parameter to check. +Whether the parameter is mandatory or not. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 5 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Actual +### -ParameterName -The actual command to check. +The name of the parameter to check. E.g. -Get-Command "Invoke-WebRequest" +Uri ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 6 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Type -The reason why the input should be the expected value. +The type of the parameter to check. +E.g. +[string] ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 7 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -259,10 +309,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-HaveParameter](https://pester.dev/docs/commands/Should-HaveParameter) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-HaveParameter](https://pester.dev/docs/commands/Should-HaveParameter) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-HaveType.mdx b/docs/commands/Should-HaveType.mdx index 45b584e3..32c0eb6e 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 [-Expected] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -49,55 +49,75 @@ These assertions will pass, because the actual value is of the expected type. The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected type. +The reason why the input should be the expected type. ```yaml -Type: Type -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the input should be the expected type. +The expected type. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Type +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -110,10 +130,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-HaveType](https://pester.dev/docs/commands/Should-HaveType) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-HaveType](https://pester.dev/docs/commands/Should-HaveType) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-Invoke.mdx b/docs/commands/Should-Invoke.mdx index 34328284..4b301ea7 100644 --- a/docs/commands/Should-Invoke.mdx +++ b/docs/commands/Should-Invoke.mdx @@ -26,28 +26,28 @@ and throws an exception if it has not. ### Default (Default) ```powershell -Should-Invoke [-CommandName] [[-Times] ] [-ParameterFilter ] - [-ExclusiveFilter ] [-ModuleName ] [-Scope ] [-Exactly] [-Because ] - [] +Should-Invoke [-CommandName] [[-Times] ] [-ParameterFilter ] + [-ExclusiveFilter ] [-ModuleName ] [-Scope ] [-Exactly] + [-Because ] ``` ### ExclusiveFilter ```powershell -Should-Invoke -ExclusiveFilter [] +Should-Invoke -ExclusiveFilter ``` ### Verifiable ```powershell -Should-Invoke [-Because ] [-Verifiable] [] +Should-Invoke [-Because ] [-Verifiable] ``` ## DESCRIPTION This command verifies that a mocked command has been called a certain number -of times. -If the call history of the mocked command does not match the parameters +of times. + If the call history of the mocked command does not match the parameters passed to Should-Invoke, Should-Invoke will throw an exception. ## EXAMPLES @@ -150,91 +150,112 @@ It is a shorthand for pairing a `Should-Invoke` and a `Should-NotInvoke`. ## PARAMETERS -### -CommandName +### -Because -The mocked command whose call history should be checked. +The reason why the mock should be called. ```yaml -Type: String -Parameter Sets: Default -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Verifiable + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Default + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Times +### -CommandName -The number of times that the mock must be called to avoid an exception -from throwing. +The mocked command whose call history should be checked. ```yaml -Type: Int32 -Parameter Sets: Default -Aliases: - -Required: False -Position: 2 -Default value: 1 -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Default + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ParameterFilter +### -Exactly -An optional filter to qualify which calls should be counted. -Only those -calls to the mock whose parameters cause this filter to return true -will be counted. +If this switch is present, the number specified in Times must match +exactly the number of times the mock has been called. +Otherwise it +must match "at least" the number of times specified. + If the value +passed to the Times parameter is zero, the Exactly switch is implied. ```yaml -Type: ScriptBlock -Parameter Sets: Default -Aliases: - -Required: False -Position: Named -Default value: { $True } -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Default + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExclusiveFilter Like ParameterFilter, except when you use ExclusiveFilter, and there were any calls to the mocked command which do not match the filter, -an exception will be thrown. -This is a convenient way to avoid needing +an exception will be thrown. + This is a convenient way to avoid needing to have two calls to Should-Invoke like this: Should-Invoke SomeCommand -Times 1 -ParameterFilter \{ $something -eq $true \} Should-Invoke SomeCommand -Times 0 -ParameterFilter \{ $something -ne $true \} ```yaml -Type: ScriptBlock -Parameter Sets: Default -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -```yaml -Type: ScriptBlock -Parameter Sets: ExclusiveFilter -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: ExclusiveFilter + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Default + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ModuleName @@ -244,15 +265,44 @@ This is optional, and must match the ModuleName that was used when setting up the Mock. ```yaml -Type: String -Parameter Sets: Default -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Default + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -ParameterFilter + +An optional filter to qualify which calls should be counted. +Only those +calls to the mock whose parameters cause this filter to return true +will be counted. + +```yaml +Type: System.Management.Automation.ScriptBlock +DefaultValue: '{ $True }' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Default + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Scope @@ -269,52 +319,42 @@ Context, the command will identify all calls to the mocked command in the current Describe / Context block, as well as all child scopes of that block. ```yaml -Type: String -Parameter Sets: Default -Aliases: - -Required: False -Position: Named -Default value: 0 -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Exactly - -If this switch is present, the number specified in Times must match -exactly the number of times the mock has been called. -Otherwise it -must match "at least" the number of times specified. -If the value -passed to the Times parameter is zero, the Exactly switch is implied. - -```yaml -Type: SwitchParameter -Parameter Sets: Default -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: 0 +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Default + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Times -The reason why the mock should be called. +The number of times that the mock must be called to avoid an exception +from throwing. ```yaml -Type: String -Parameter Sets: Default, Verifiable -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Int32 +DefaultValue: 1 +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Default + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Verifiable @@ -322,20 +362,28 @@ Accept wildcard characters: False Makes sure that all verifiable mocks were called. ```yaml -Type: SwitchParameter -Parameter Sets: Verifiable -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Verifiable + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -344,10 +392,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES The parameter filter passed to Should-Invoke does not necessarily have to match the parameter filter -(if any) which was used to create the Mock. -Should-Invoke will find any entry in the command history -which matches its parameter filter, regardless of how the Mock was created. -However, if any calls to the +(if any) which was used to create the Mock. + Should-Invoke will find any entry in the command history +which matches its parameter filter, regardless of how the Mock was created. + However, if any calls to the mocked command are made which did not match any mock's parameter filter (resulting in the original command being executed instead of a mock), these calls to the original command are not tracked in the call history. In other words, Should-Invoke can only be used to check for calls to the mocked implementation, not @@ -361,10 +409,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-Invoke](https://pester.dev/docs/commands/Should-Invoke) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-Invoke](https://pester.dev/docs/commands/Should-Invoke) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-MatchString.mdx b/docs/commands/Should-MatchString.mdx index b8ca0a0d..b39f5b6b 100644 --- a/docs/commands/Should-MatchString.mdx +++ b/docs/commands/Should-MatchString.mdx @@ -23,8 +23,7 @@ Tests whether a string matches a regular expression pattern. ## SYNTAX ```powershell -Should-MatchString [[-Actual] ] [-Expected] [-CaseSensitive] [-Because ] - [] +Should-MatchString [-Expected] [[-Actual] ] [-CaseSensitive] [-Because ] ``` ## DESCRIPTION @@ -66,31 +65,41 @@ This assertion fails, because with `-CaseSensitive` the lowercase `pester` in th The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected regular expression pattern. +The reason why the actual value should match the regular expression pattern. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CaseSensitive @@ -98,39 +107,54 @@ Accept wildcard characters: False Indicates that the comparison should be case-sensitive. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the actual value should match the regular expression pattern. +The expected regular expression pattern. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -143,10 +167,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-MatchString](https://pester.dev/docs/commands/Should-MatchString) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-MatchString](https://pester.dev/docs/commands/Should-MatchString) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-NotBe.mdx b/docs/commands/Should-NotBe.mdx index f4d627b7..c35b1f90 100644 --- a/docs/commands/Should-NotBe.mdx +++ b/docs/commands/Should-NotBe.mdx @@ -23,7 +23,7 @@ Compares the expected value to actual value, to see if they are not equal. ## SYNTAX ```powershell -Should-NotBe [[-Actual] ] [-Expected] [-Because ] [] +Should-NotBe [-Expected] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -49,55 +49,75 @@ These assertions will pass, because the actual value is not equal to the expecte The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected value. +The reason why the input should not be the expected value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the input should not be the expected value. +The expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -110,10 +130,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-NotBe](https://pester.dev/docs/commands/Should-NotBe) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-NotBe](https://pester.dev/docs/commands/Should-NotBe) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-NotBeEmptyString.mdx b/docs/commands/Should-NotBeEmptyString.mdx index e24891e3..07754da1 100644 --- a/docs/commands/Should-NotBeEmptyString.mdx +++ b/docs/commands/Should-NotBeEmptyString.mdx @@ -23,7 +23,7 @@ Ensures that the input is a string, and that the input is not $null or empty str ## SYNTAX ```powershell -Should-NotBeEmptyString [[-Actual] ] [-Because ] [] +Should-NotBeEmptyString [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -69,15 +69,20 @@ All the tests above will fail, the input is not a string. The actual value that will be compared. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Because @@ -85,23 +90,33 @@ Accept wildcard characters: False The reason why the input should be a string that is not $null or empty. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -114,10 +129,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-NotBeEmptyString](https://pester.dev/docs/commands/Should-NotBeEmptyString) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-NotBeEmptyString](https://pester.dev/docs/commands/Should-NotBeEmptyString) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-NotBeLikeString.mdx b/docs/commands/Should-NotBeLikeString.mdx index 4a1b976f..30d27edd 100644 --- a/docs/commands/Should-NotBeLikeString.mdx +++ b/docs/commands/Should-NotBeLikeString.mdx @@ -23,8 +23,8 @@ Asserts that the actual value is not like the expected value. ## SYNTAX ```powershell -Should-NotBeLikeString [[-Actual] ] [-Expected] [-CaseSensitive] [-Because ] - [] +Should-NotBeLikeString [-Expected] [[-Actual] ] [-CaseSensitive] + [-Because ] ``` ## DESCRIPTION @@ -57,31 +57,41 @@ This assertion will fail, because the actual value is like the expected value. The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected value. +The reason why the actual value should not be like the expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CaseSensitive @@ -89,39 +99,54 @@ Accept wildcard characters: False Indicates that the comparison should be case-sensitive. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the actual value should not be like the expected value. +The expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -136,10 +161,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-NotBeLikeString](https://pester.dev/docs/commands/Should-NotBeLikeString) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-NotBeLikeString](https://pester.dev/docs/commands/Should-NotBeLikeString) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-NotBeNull.mdx b/docs/commands/Should-NotBeNull.mdx index 5d9b4a75..6d7ab24a 100644 --- a/docs/commands/Should-NotBeNull.mdx +++ b/docs/commands/Should-NotBeNull.mdx @@ -23,7 +23,7 @@ Asserts that the input is not `$null`. ## SYNTAX ```powershell -Should-NotBeNull [[-Actual] ] [-Because ] [] +Should-NotBeNull [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -49,15 +49,20 @@ These assertions will pass, because the actual value is not `$null. The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Because @@ -65,23 +70,33 @@ Accept wildcard characters: False The reason why the input should not be `$null`. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -94,10 +109,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-NotBeNull](https://pester.dev/docs/commands/Should-NotBeNull) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-NotBeNull](https://pester.dev/docs/commands/Should-NotBeNull) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-NotBeSame.mdx b/docs/commands/Should-NotBeSame.mdx index e2ae196d..fc09cb61 100644 --- a/docs/commands/Should-NotBeSame.mdx +++ b/docs/commands/Should-NotBeSame.mdx @@ -23,7 +23,7 @@ Compares the expected value to actual value, to see if the actual value is not t ## SYNTAX ```powershell -Should-NotBeSame [[-Actual] ] [-Expected] [-Because ] [] +Should-NotBeSame [-Expected] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -58,55 +58,75 @@ This assertion will fail, because the actual value is the same instance as the e The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected value. +The reason why the input should not be the expected value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the input should not be the expected value. +The expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -121,10 +141,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-NotBeSame](https://pester.dev/docs/commands/Should-NotBeSame) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-NotBeSame](https://pester.dev/docs/commands/Should-NotBeSame) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-NotBeString.mdx b/docs/commands/Should-NotBeString.mdx index 925f0a1c..2fd4a7aa 100644 --- a/docs/commands/Should-NotBeString.mdx +++ b/docs/commands/Should-NotBeString.mdx @@ -23,8 +23,8 @@ Asserts that the actual value is not equal to the expected value. ## SYNTAX ```powershell -Should-NotBeString [[-Actual] ] [[-Expected] ] [-Because ] [-CaseSensitive] - [-IgnoreWhitespace] [] +Should-NotBeString [[-Expected] ] [[-Actual] ] [-Because ] [-CaseSensitive] + [-IgnoreWhitespace] ``` ## DESCRIPTION @@ -57,63 +57,83 @@ This assertion will fail, because the actual value is equal to the expected valu The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected value. +The reason why the actual value should not be equal to the expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -CaseSensitive -The reason why the actual value should not be equal to the expected value. +Indicates that the comparison should be case-sensitive. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -CaseSensitive +### -Expected -Indicates that the comparison should be case-sensitive. +The expected value. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -IgnoreWhitespace @@ -121,23 +141,33 @@ Accept wildcard characters: False Indicates that the comparison should ignore whitespace. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -152,10 +182,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-NotBeString](https://pester.dev/docs/commands/Should-NotBeString) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-NotBeString](https://pester.dev/docs/commands/Should-NotBeString) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-NotBeWhiteSpaceString.mdx b/docs/commands/Should-NotBeWhiteSpaceString.mdx index c00369fd..ac8a0086 100644 --- a/docs/commands/Should-NotBeWhiteSpaceString.mdx +++ b/docs/commands/Should-NotBeWhiteSpaceString.mdx @@ -23,7 +23,7 @@ Ensures that the input is a string, and that the input is not $null, empty, or w ## SYNTAX ```powershell -Should-NotBeWhiteSpaceString [[-Actual] ] [-Because ] [] +Should-NotBeWhiteSpaceString [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -70,15 +70,20 @@ All the tests above will fail, the input is not a string. The actual value that will be compared. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Because @@ -86,23 +91,33 @@ Accept wildcard characters: False The reason why the input should be a string that is not $null, empty, or whitespace only string. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -115,10 +130,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-NotBeWhiteSpaceString](https://pester.dev/docs/commands/Should-NotBeWhiteSpaceString) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-NotBeWhiteSpaceString](https://pester.dev/docs/commands/Should-NotBeWhiteSpaceString) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-NotContainCollection.mdx b/docs/commands/Should-NotContainCollection.mdx index e8257bf1..629b9c42 100644 --- a/docs/commands/Should-NotContainCollection.mdx +++ b/docs/commands/Should-NotContainCollection.mdx @@ -18,13 +18,12 @@ Contributions are welcome in [Pester-repo](https://github.com/pester/pester). ## SYNOPSIS -Checks that the expected collection is not present in the actual collection as an ordered subsequence. -It does not compare the types of the input collections. +Checks that the expected collection is not present in the actual collection as an ordered subsequence. It does not compare the types of the input collections. ## SYNTAX ```powershell -Should-NotContainCollection [[-Actual] ] [-Expected] [-Because ] [] +Should-NotContainCollection [-Expected] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -64,56 +63,76 @@ Gaps between them, as in `@(1, 3)`, are allowed. The collection to search in. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -One or more items to look for as an ordered subsequence. -A single value is treated as a one-item collection. +The reason why the input should be the expected value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the input should be the expected value. +One or more items to look for as an ordered subsequence. +A single value is treated as a one-item collection. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -126,10 +145,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-NotContainCollection](https://pester.dev/docs/commands/Should-NotContainCollection) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-NotContainCollection](https://pester.dev/docs/commands/Should-NotContainCollection) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-NotHaveParameter.mdx b/docs/commands/Should-NotHaveParameter.mdx index 44f3d8b3..e14bf85d 100644 --- a/docs/commands/Should-NotHaveParameter.mdx +++ b/docs/commands/Should-NotHaveParameter.mdx @@ -23,8 +23,7 @@ Asserts that a command has does not have the parameter. ## SYNTAX ```powershell -Should-NotHaveParameter [[-ParameterName] ] [[-Actual] ] [[-Because] ] - [] +Should-NotHaveParameter [[-ParameterName] ] [[-Actual] ] [[-Because] ] ``` ## DESCRIPTION @@ -57,24 +56,6 @@ This is useful for guarding against accidentally adding parameters you want to k ## PARAMETERS -### -ParameterName - -The name of the parameter to check. -E.g. -Uri - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -Actual The actual command to check. @@ -82,15 +63,20 @@ E.g. Get-Command "Invoke-WebRequest" ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Because @@ -98,23 +84,56 @@ Accept wildcard characters: False The reason why the input should be the expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -ParameterName + +The name of the parameter to check. +E.g. +Uri + +```yaml +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -127,10 +146,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-NotHaveParameter](https://pester.dev/docs/commands/Should-NotHaveParameter) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-NotHaveParameter](https://pester.dev/docs/commands/Should-NotHaveParameter) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-NotHaveType.mdx b/docs/commands/Should-NotHaveType.mdx index 1fa4c824..5a2dc357 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 [-Expected] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -49,55 +49,75 @@ These assertions will pass, because the actual value is not of the expected type The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected type. +The reason why the input should not be the expected type. ```yaml -Type: Type -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the input should not be the expected type. +The expected type. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Type +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -112,10 +132,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-NotHaveType](https://pester.dev/docs/commands/Should-NotHaveType) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-NotHaveType](https://pester.dev/docs/commands/Should-NotHaveType) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-NotInvoke.mdx b/docs/commands/Should-NotInvoke.mdx index 815eff5e..61112a46 100644 --- a/docs/commands/Should-NotInvoke.mdx +++ b/docs/commands/Should-NotInvoke.mdx @@ -25,28 +25,28 @@ Checks that mocked command was not called and throws exception if it was. ### Default (Default) ```powershell -Should-NotInvoke [-CommandName] [[-Times] ] [-ParameterFilter ] - [-ExclusiveFilter ] [-ModuleName ] [-Scope ] [-Exactly] [-Because ] - [] +Should-NotInvoke [-CommandName] [[-Times] ] [-ParameterFilter ] + [-ExclusiveFilter ] [-ModuleName ] [-Scope ] [-Exactly] + [-Because ] ``` ### ExclusiveFilter ```powershell -Should-NotInvoke -ExclusiveFilter [] +Should-NotInvoke -ExclusiveFilter ``` ### Verifiable ```powershell -Should-NotInvoke [-Because ] [-Verifiable] [] +Should-NotInvoke [-Because ] [-Verifiable] ``` ## DESCRIPTION This command verifies that a mocked command has not been called a certain number -of times. -If the call history of the mocked command does not match the parameters +of times. + If the call history of the mocked command does not match the parameters passed to Should-NotInvoke, Should-NotInvoke will throw an exception. ## EXAMPLES @@ -103,109 +103,159 @@ Describe 'Remove-TempFile' { ## PARAMETERS -### -CommandName +### -Because -The mocked command whose call history should be checked. +The reason why the mock should be called. ```yaml -Type: String -Parameter Sets: Default -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Verifiable + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Default + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Times +### -CommandName -The number of times that the mock must be called to avoid an exception -from throwing. +The mocked command whose call history should be checked. ```yaml -Type: Int32 -Parameter Sets: Default -Aliases: - -Required: False -Position: 2 -Default value: 1 -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Default + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ParameterFilter +### -Exactly -An optional filter to qualify which calls should be counted. -Only those -calls to the mock whose parameters cause this filter to return true -will be counted. +If this switch is present, the number specified in Times must match +exactly the number of times the mock has been called. +Otherwise it +must match "at least" the number of times specified. + If the value +passed to the Times parameter is zero, the Exactly switch is implied. ```yaml -Type: ScriptBlock -Parameter Sets: Default -Aliases: - -Required: False -Position: Named -Default value: { $True } -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Default + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExclusiveFilter Like ParameterFilter, except when you use ExclusiveFilter, and there were any calls to the mocked command which do not match the filter, -an exception will be thrown. -This is a convenient way to avoid needing +an exception will be thrown. + This is a convenient way to avoid needing to have two calls to Should-NotInvoke like this: Should-NotInvoke SomeCommand -Times 1 -ParameterFilter \{ $something -eq $true \} Should-NotInvoke SomeCommand -Times 0 -ParameterFilter \{ $something -ne $true \} ```yaml -Type: ScriptBlock -Parameter Sets: Default -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: ExclusiveFilter + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Default + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` +### -ModuleName + +The module where the mock being checked was injected. + This is optional, +and must match the ModuleName that was used when setting up the Mock. + ```yaml -Type: ScriptBlock -Parameter Sets: ExclusiveFilter -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Default + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ModuleName +### -ParameterFilter -The module where the mock being checked was injected. -This is optional, -and must match the ModuleName that was used when setting up the Mock. +An optional filter to qualify which calls should be counted. +Only those +calls to the mock whose parameters cause this filter to return true +will be counted. ```yaml -Type: String -Parameter Sets: Default -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '{ $True }' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Default + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Scope @@ -222,52 +272,42 @@ Context, the command will identify all calls to the mocked command in the current Describe / Context block, as well as all child scopes of that block. ```yaml -Type: String -Parameter Sets: Default -Aliases: - -Required: False -Position: Named -Default value: 0 -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: 0 +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Default + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Exactly - -If this switch is present, the number specified in Times must match -exactly the number of times the mock has been called. -Otherwise it -must match "at least" the number of times specified. -If the value -passed to the Times parameter is zero, the Exactly switch is implied. - -```yaml -Type: SwitchParameter -Parameter Sets: Default -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Because +### -Times -The reason why the mock should be called. +The number of times that the mock must be called to avoid an exception +from throwing. ```yaml -Type: String -Parameter Sets: Default, Verifiable -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Int32 +DefaultValue: 1 +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Default + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Verifiable @@ -275,20 +315,28 @@ Accept wildcard characters: False Makes sure that all verifiable mocks were called. ```yaml -Type: SwitchParameter -Parameter Sets: Verifiable -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Verifiable + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -297,10 +345,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES The parameter filter passed to Should-NotInvoke does not necessarily have to match the parameter filter -(if any) which was used to create the Mock. -Should-NotInvoke will find any entry in the command history -which matches its parameter filter, regardless of how the Mock was created. -However, if any calls to the +(if any) which was used to create the Mock. + Should-NotInvoke will find any entry in the command history +which matches its parameter filter, regardless of how the Mock was created. + However, if any calls to the mocked command are made which did not match any mock's parameter filter (resulting in the original command being executed instead of a mock), these calls to the original command are not tracked in the call history. In other words, Should-NotInvoke can only be used to check for calls to the mocked implementation, not @@ -314,10 +362,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-NotInvoke](https://pester.dev/docs/commands/Should-NotInvoke) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-NotInvoke](https://pester.dev/docs/commands/Should-NotInvoke) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-NotMatchString.mdx b/docs/commands/Should-NotMatchString.mdx index 179ea94a..5e79fd9a 100644 --- a/docs/commands/Should-NotMatchString.mdx +++ b/docs/commands/Should-NotMatchString.mdx @@ -23,8 +23,7 @@ Tests whether a string does not match a regular expression pattern. ## SYNTAX ```powershell -Should-NotMatchString [[-Actual] ] [-Expected] [-CaseSensitive] [-Because ] - [] +Should-NotMatchString [-Expected] [[-Actual] ] [-CaseSensitive] [-Because ] ``` ## DESCRIPTION @@ -67,31 +66,41 @@ This assertion fails, because the actual value case-sensitively contains `failed The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected regular expression pattern. +The reason why the actual value should not match the regular expression pattern. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CaseSensitive @@ -99,39 +108,54 @@ Accept wildcard characters: False Indicates that the comparison should be case-sensitive. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the actual value should not match the regular expression pattern. +The expected regular expression pattern. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -144,10 +168,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-NotMatchString](https://pester.dev/docs/commands/Should-NotMatchString) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-NotMatchString](https://pester.dev/docs/commands/Should-NotMatchString) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-Throw.mdx b/docs/commands/Should-Throw.mdx index d38f28c3..dfd5c9b5 100644 --- a/docs/commands/Should-Throw.mdx +++ b/docs/commands/Should-Throw.mdx @@ -23,8 +23,9 @@ Asserts that a script block throws an exception. ## SYNTAX ```powershell -Should-Throw -ScriptBlock [[-ExceptionMessage] ] [[-FullyQualifiedErrorId] ] - [[-ExceptionType] ] [[-Because] ] [-AllowNonTerminatingError] [] +Should-Throw [[-ExceptionMessage] ] [[-FullyQualifiedErrorId] ] + [[-ExceptionType] ] [[-Because] ] -ScriptBlock + [-AllowNonTerminatingError] ``` ## DESCRIPTION @@ -59,54 +60,68 @@ The error record is returned from the assertion and can be used in further asser ## PARAMETERS -### -ScriptBlock +### -AllowNonTerminatingError -The script block that should throw an exception. +If set, the assertion will pass if a non-terminating error is thrown. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ExceptionMessage +### -Because -The message that the exception should contain. -`-like` wildcards are supported. +The reason why the input should be the expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -FullyQualifiedErrorId +### -ExceptionMessage -The FullyQualifiedErrorId that the exception should contain. +The message that the exception should contain. `-like` wildcards are supported. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExceptionType @@ -114,55 +129,76 @@ Accept wildcard characters: False The type of exception that should be thrown. ```yaml -Type: Type -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Type +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -FullyQualifiedErrorId -The reason why the input should be the expected value. +The FullyQualifiedErrorId that the exception should contain. +`-like` wildcards are supported. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -AllowNonTerminatingError +### -ScriptBlock -If set, the assertion will pass if a non-terminating error is thrown. +The script block that should throw an exception. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: true + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Management.Automation.ScriptBlock + ## OUTPUTS ## NOTES @@ -175,10 +211,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-Throw](https://pester.dev/docs/commands/Should-Throw) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-Throw](https://pester.dev/docs/commands/Should-Throw) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should.mdx b/docs/commands/Should.mdx index e004e434..f3f0de23 100644 --- a/docs/commands/Should.mdx +++ b/docs/commands/Should.mdx @@ -22,189 +22,8 @@ Should is a keyword that is used to define an assertion inside an It block. ## SYNTAX -### Be - -```powershell -Should [[-ActualValue] ] [-Be] [-Not] [-ExpectedValue ] - [-Because ] [] -``` - -### BeExactly - -```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeExactly] [] -``` - -### BeGreaterThan - -```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeGreaterThan] [] -``` - -### BeLessOrEqual - -```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeLessOrEqual] [] -``` - -### BeIn - -```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeIn] [] -``` - -### BeLessThan - -```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeLessThan] [] -``` - -### BeGreaterOrEqual - -```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeGreaterOrEqual] [] -``` - -### BeLike - -```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeLike] [] -``` - -### BeLikeExactly - -```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeLikeExactly] [] -``` - -### BeNullOrEmpty - -```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-BeNullOrEmpty] [] -``` - -### BeOfType - -```powershell -Should [[-ActualValue] ] [-Not] [-Because ] [-BeOfType] - [-ExpectedType ] [] -``` - -### BeTrue - -```powershell -Should [[-ActualValue] ] [-Not] [-Because ] [-BeTrue] - [] -``` - -### BeFalse - -```powershell -Should [[-ActualValue] ] [-Not] [-Because ] [-BeFalse] - [] -``` - -### Contain - -```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-Contain] [] -``` - -### Exist - -```powershell -Should [[-ActualValue] ] [-Not] [-Because ] [-Exist] - [-LiteralPath] [] -``` - -### FileContentMatch - -```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-FileContentMatch] [-ExpectedContent ] [] -``` - -### FileContentMatchExactly - -```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-ExpectedContent ] [-FileContentMatchExactly] [] -``` - -### FileContentMatchMultiline - -```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-ExpectedContent ] [-FileContentMatchMultiline] [] -``` - -### FileContentMatchMultilineExactly - -```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-ExpectedContent ] [-FileContentMatchMultilineExactly] [] -``` - -### HaveCount - ```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-HaveCount] [] -``` - -### HaveParameter - -```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-HaveParameter] [-ParameterName ] [-Type ] [-DefaultValue ] [-Mandatory] - [-InParameterSet ] [-HasArgumentCompleter] [-Alias ] [] -``` - -### Match - -```powershell -Should [[-ActualValue] ] [-Not] [-Because ] [-Match] - [-RegularExpression ] [] -``` - -### MatchExactly - -```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-RegularExpression ] [-MatchExactly] [] -``` - -### Throw - -```powershell -Should [[-ActualValue] ] [-Not] [-Because ] [-Throw] - [-ExpectedMessage ] [-ErrorId ] [-ExceptionType ] [-PassThru] [] -``` - -### InvokeVerifiable - -```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-InvokeVerifiable] [] -``` - -### Invoke - -```powershell -Should [[-ActualValue] ] [-Not] [-Because ] [-Invoke] - [-CommandName ] [-Times ] [-ParameterFilter ] [-ExclusiveFilter ] - [-ModuleName ] [-Scope ] [-Exactly] [-CallerSessionState ] - [-CommandDisplayName ] [] +Should [[-ActualValue] ] ``` ## DESCRIPTION @@ -296,32 +115,41 @@ The actual value that was obtained in the test which should be verified against a expected value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: true +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Alias -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 7 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Be @@ -329,49 +157,214 @@ Accept wildcard characters: False Compares one object with another for equality and throws if the two objects are not the same. ```yaml -Type: SwitchParameter -Parameter Sets: Be -Aliases: EQ - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- EQ +ParameterSets: +- Name: Be + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Because -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Be + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeExactly + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterThan + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessOrEqual + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeIn + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessThan + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterOrEqual + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLike + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLikeExactly + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeNullOrEmpty + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeOfType + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeTrue + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeFalse + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Contain + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Exist + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatch + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchExactly + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchMultiline + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchMultilineExactly + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: HaveCount + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: HaveParameter + Position: 8 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Match + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: MatchExactly + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Throw + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: InvokeVerifiable + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Invoke + Position: 8 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeExactly -Compares one object with another for equality and throws if the two objects are not the same. -This comparison is case sensitive. +Compares one object with another for equality and throws if the two objects are not the same. This comparison is case sensitive. ```yaml -Type: SwitchParameter -Parameter Sets: BeExactly -Aliases: CEQ - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- CEQ +ParameterSets: +- Name: BeExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeFalse @@ -379,151 +372,192 @@ Accept wildcard characters: False Asserts that the value is false, or falsy. ```yaml -Type: SwitchParameter -Parameter Sets: BeFalse -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeFalse + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeGreaterOrEqual -Asserts that a number (or other comparable value) is greater than or equal to an expected value. -Uses PowerShell's -ge operator to compare the two values. +Asserts that a number (or other comparable value) is greater than or equal to an expected value. Uses PowerShell's -ge operator to compare the two values. ```yaml -Type: SwitchParameter -Parameter Sets: BeGreaterOrEqual -Aliases: GE - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- GE +ParameterSets: +- Name: BeGreaterOrEqual + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeGreaterThan -Asserts that a number (or other comparable value) is greater than an expected value. -Uses PowerShell's -gt operator to compare the two values. +Asserts that a number (or other comparable value) is greater than an expected value. Uses PowerShell's -gt operator to compare the two values. ```yaml -Type: SwitchParameter -Parameter Sets: BeGreaterThan -Aliases: GT - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- GT +ParameterSets: +- Name: BeGreaterThan + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeIn -Asserts that a collection of values contain a specific value. -Uses PowerShell's -contains operator to confirm. +Asserts that a collection of values contain a specific value. Uses PowerShell's -contains operator to confirm. ```yaml -Type: SwitchParameter -Parameter Sets: BeIn -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeIn + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeLessOrEqual -Asserts that a number (or other comparable value) is lower than, or equal to an expected value. -Uses PowerShell's -le operator to compare the two values. +Asserts that a number (or other comparable value) is lower than, or equal to an expected value. Uses PowerShell's -le operator to compare the two values. ```yaml -Type: SwitchParameter -Parameter Sets: BeLessOrEqual -Aliases: LE - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- LE +ParameterSets: +- Name: BeLessOrEqual + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeLessThan -Asserts that a number (or other comparable value) is lower than an expected value. -Uses PowerShell's -lt operator to compare the two values. +Asserts that a number (or other comparable value) is lower than an expected value. Uses PowerShell's -lt operator to compare the two values. ```yaml -Type: SwitchParameter -Parameter Sets: BeLessThan -Aliases: LT - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- LT +ParameterSets: +- Name: BeLessThan + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeLike -Asserts that the actual value matches a wildcard pattern using PowerShell's -like operator. -This comparison is not case-sensitive. +Asserts that the actual value matches a wildcard pattern using PowerShell's -like operator. This comparison is not case-sensitive. ```yaml -Type: SwitchParameter -Parameter Sets: BeLike -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeLike + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeLikeExactly -Asserts that the actual value matches a wildcard pattern using PowerShell's -like operator. -This comparison is case-sensitive. +Asserts that the actual value matches a wildcard pattern using PowerShell's -like operator. This comparison is case-sensitive. ```yaml -Type: SwitchParameter -Parameter Sets: BeLikeExactly -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeLikeExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeNullOrEmpty -Checks values for null or empty (strings). -The static [String]::IsNullOrEmpty() method is used to do the comparison. +Checks values for null or empty (strings). The static [String]::IsNullOrEmpty() method is used to do the comparison. ```yaml -Type: SwitchParameter -Parameter Sets: BeNullOrEmpty -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeNullOrEmpty + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeOfType @@ -531,15 +565,21 @@ Accept wildcard characters: False Asserts that the actual value should be an object of a specified type (or a subclass of the specified type) using PowerShell's -is operator. ```yaml -Type: SwitchParameter -Parameter Sets: BeOfType -Aliases: HaveType - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- HaveType +ParameterSets: +- Name: BeOfType + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeTrue @@ -547,288 +587,434 @@ Accept wildcard characters: False Asserts that the value is true, or truthy. ```yaml -Type: SwitchParameter -Parameter Sets: BeTrue -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeTrue + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CallerSessionState -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 9 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CommandDisplayName -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 10 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CommandName -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Contain -Asserts that collection contains a specific value. -Uses PowerShell's -contains operator to confirm. +Asserts that collection contains a specific value. Uses PowerShell's -contains operator to confirm. ```yaml -Type: SwitchParameter -Parameter Sets: Contain -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Contain + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -DefaultValue -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ErrorId -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Throw + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Exactly -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: SwitchParameter -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 7 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExceptionType -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Throw + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExclusiveFilter -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Exist -Does not perform any comparison, but checks if the object calling Exist is present in a PS Provider. -The object must have valid path syntax. -It essentially must pass a Test-Path call. +Does not perform any comparison, but checks if the object calling Exist is present in a PS Provider. The object must have valid path syntax. It essentially must pass a Test-Path call. ```yaml -Type: SwitchParameter -Parameter Sets: Exist -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Exist + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExpectedContent -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: FileContentMatch, FileContentMatchExactly, FileContentMatchMultiline, FileContentMatchMultilineExactly -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FileContentMatch + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchExactly + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchMultiline + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchMultilineExactly + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExpectedMessage -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Throw + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExpectedType -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: BeOfType -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeOfType + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExpectedValue -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Be, BeExactly, BeGreaterThan, BeLessOrEqual, BeIn, BeLessThan, BeGreaterOrEqual, BeLike, BeLikeExactly, Contain, HaveCount -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Be + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeExactly + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterThan + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessOrEqual + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeIn + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessThan + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterOrEqual + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLike + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLikeExactly + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Contain + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: HaveCount + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -FileContentMatch -Checks to see if a file contains the specified text. -This search is not case sensitive and uses regular expressions. +Checks to see if a file contains the specified text. This search is not case sensitive and uses regular expressions. ```yaml -Type: SwitchParameter -Parameter Sets: FileContentMatch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FileContentMatch + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -FileContentMatchExactly -Checks to see if a file contains the specified text. -This search is case sensitive and uses regular expressions to match the text. +Checks to see if a file contains the specified text. This search is case sensitive and uses regular expressions to match the text. ```yaml -Type: SwitchParameter -Parameter Sets: FileContentMatchExactly -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FileContentMatchExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -FileContentMatchMultiline @@ -838,15 +1024,20 @@ As opposed to FileContentMatch and FileContentMatchExactly operators, FileConten When using FileContentMatchMultiline operator, '^' and '$' represent the beginning and end of the whole file, instead of the beginning and end of a line ```yaml -Type: SwitchParameter -Parameter Sets: FileContentMatchMultiline -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FileContentMatchMultiline + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -FileContentMatchMultilineExactly @@ -856,32 +1047,41 @@ As opposed to FileContentMatch and FileContentMatchExactly operators, FileConten When using FileContentMatchMultilineExactly operator, '^' and '$' represent the beginning and end of the whole file, instead of the beginning and end of a line. ```yaml -Type: SwitchParameter -Parameter Sets: FileContentMatchMultilineExactly -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FileContentMatchMultilineExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -HasArgumentCompleter -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: SwitchParameter -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 6 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -HaveCount @@ -889,15 +1089,20 @@ Accept wildcard characters: False Asserts that a collection has the expected amount of items. ```yaml -Type: SwitchParameter -Parameter Sets: HaveCount -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveCount + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -HaveParameter @@ -905,32 +1110,41 @@ Accept wildcard characters: False Asserts that a command has the expected parameter. ```yaml -Type: SwitchParameter -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -InParameterSet -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 5 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Invoke @@ -938,117 +1152,147 @@ Accept wildcard characters: False Checks if a Mocked command has been called a certain number of times and throws an exception if it has not. ```yaml -Type: SwitchParameter -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -InvokeVerifiable -Checks if any Verifiable Mock has not been invoked. -If so, this will throw an exception. +Checks if any Verifiable Mock has not been invoked. If so, this will throw an exception. ```yaml -Type: SwitchParameter -Parameter Sets: InvokeVerifiable -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: InvokeVerifiable + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -LiteralPath -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: SwitchParameter -Parameter Sets: Exist -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Exist + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Mandatory -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: SwitchParameter -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Match -Uses a regular expression to compare two objects. -This comparison is not case sensitive. +Uses a regular expression to compare two objects. This comparison is not case sensitive. ```yaml -Type: SwitchParameter -Parameter Sets: Match -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Match + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -MatchExactly -Uses a regular expression to compare two objects. -This comparison is case sensitive. +Uses a regular expression to compare two objects. This comparison is case sensitive. ```yaml -Type: SwitchParameter -Parameter Sets: MatchExactly -Aliases: CMATCH - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- CMATCH +ParameterSets: +- Name: MatchExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ModuleName -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 5 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Not @@ -1056,169 +1300,366 @@ Accept wildcard characters: False Reverse the assertion ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Be + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterThan + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessOrEqual + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeIn + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessThan + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterOrEqual + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLike + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLikeExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeNullOrEmpty + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeOfType + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeTrue + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeFalse + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Contain + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Exist + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatch + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchMultiline + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchMultilineExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: HaveCount + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: HaveParameter + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Match + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: MatchExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Throw + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: InvokeVerifiable + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Invoke + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ParameterFilter -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ParameterName -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -PassThru -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: SwitchParameter -Parameter Sets: Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Throw + Position: 5 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -RegularExpression -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Match, MatchExactly -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Match + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: MatchExactly + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Scope -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 6 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Throw -Checks if an exception was thrown. -Enclose input in a scriptblock. +Checks if an exception was thrown. Enclose input in a scriptblock. ```yaml -Type: SwitchParameter -Parameter Sets: Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Throw + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Times -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Type -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES ## RELATED LINKS -[https://pester.dev/docs/commands/Should](https://pester.dev/docs/commands/Should) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should](https://pester.dev/docs/commands/Should) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## 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.0.0](https://github.com/pester/pester).* diff --git a/generate-command-reference.ps1 b/generate-command-reference.ps1 index bf9733f8..3770037b 100644 --- a/generate-command-reference.ps1 +++ b/generate-command-reference.ps1 @@ -32,9 +32,9 @@ Write-Host 'Generating MDX files for website Command Reference' -BackgroundColor # Install required modules # ----------------------------------------------------------------------------- $ModuleList = [ordered]@{ - 'PlatyPS' = $PlatyPSVersion - 'Alt3.Docusaurus.PowerShell' = $DocusaurusVersion - 'Pester' = $PesterVersion + 'Microsoft.PowerShell.PlatyPS' = $PlatyPSVersion + 'Alt3.Docusaurus.PowerShell' = $DocusaurusVersion + 'Pester' = $PesterVersion } # Can't use the original enumerator here because we may modify the dictionary mid-process $ModuleList.Keys.Clone() | ForEach-Object { @@ -238,24 +238,24 @@ function Format-SyntaxCommonParameters { # '[]' back onto its own line where the result would exceed PlatyPS's # syntax wrap width, matching the layout PlatyPS produces without ProgressAction. # ----------------------------------------------------------------------------- -Write-Host 'Post-processing generated MDX files (ProgressAction, example fences)' -ForegroundColor Magenta -$commandsFolder = Join-Path -Path $docusaurusOptions.DocsFolder -ChildPath $docusaurusOptions.Sidebar -Get-ChildItem -Path $commandsFolder -Filter '*.mdx' | ForEach-Object { - $content = Get-Content -LiteralPath $_.FullName -Raw - # Pull '[]' back up when removing ProgressAction would orphan it - $updated = $content -replace '[ ]*\[-ProgressAction \][ ]*\r?\n[ ]*\[\]', ' []' - # Remove any remaining ' [-ProgressAction ]' from the SYNTAX code-blocks - $updated = $updated -replace '[ ]*(\r?\n[ ]*)?\[-ProgressAction \]', '' - # Remove the dedicated '### -ProgressAction' section up to the next '### ' heading - $updated = $updated -replace '(?ms)^### -ProgressAction\r?\n.*?(?=^### )', '' - # Re-wrap '[]' onto its own line where the SYNTAX line is too long - $updated = Format-SyntaxCommonParameters -Content $updated - # Fix mismatched code fences inside the EXAMPLES section - $updated = Repair-ExampleFences -Content $updated - if ($updated -ne $content) { - Set-Content -LiteralPath $_.FullName -Value $updated -NoNewline -Encoding utf8 - } -} +# Write-Host 'Post-processing generated MDX files (ProgressAction, example fences)' -ForegroundColor Magenta +# $commandsFolder = Join-Path -Path $docusaurusOptions.DocsFolder -ChildPath $docusaurusOptions.Sidebar +# Get-ChildItem -Path $commandsFolder -Filter '*.mdx' | ForEach-Object { +# $content = Get-Content -LiteralPath $_.FullName -Raw +# # Pull '[]' back up when removing ProgressAction would orphan it +# $updated = $content -replace '[ ]*\[-ProgressAction \][ ]*\r?\n[ ]*\[\]', ' []' +# # Remove any remaining ' [-ProgressAction ]' from the SYNTAX code-blocks +# $updated = $updated -replace '[ ]*(\r?\n[ ]*)?\[-ProgressAction \]', '' +# # Remove the dedicated '### -ProgressAction' section up to the next '### ' heading +# $updated = $updated -replace '(?ms)^### -ProgressAction\r?\n.*?(?=^### )', '' +# # Re-wrap '[]' onto its own line where the SYNTAX line is too long +# $updated = Format-SyntaxCommonParameters -Content $updated +# # Fix mismatched code fences inside the EXAMPLES section +# $updated = Repair-ExampleFences -Content $updated +# if ($updated -ne $content) { +# Set-Content -LiteralPath $_.FullName -Value $updated -NoNewline -Encoding utf8 +# } +# } Write-Host 'Render completed successfully' -BackgroundColor DarkGreen Pop-Location From 71c0f85715441958163c1cea39b18b2d018ae4c8 Mon Sep 17 00:00:00 2001 From: Frode Flaten <3436158+fflaten@users.noreply.github.com> Date: Thu, 16 Jul 2026 21:00:42 +0000 Subject: [PATCH 02/17] Remove redundant post-processing --- generate-command-reference.ps1 | 66 ++++++---------------------------- 1 file changed, 10 insertions(+), 56 deletions(-) diff --git a/generate-command-reference.ps1 b/generate-command-reference.ps1 index 3770037b..bbfef2c5 100644 --- a/generate-command-reference.ps1 +++ b/generate-command-reference.ps1 @@ -194,68 +194,22 @@ function Repair-ExampleFences { return ($result -join $eol) } -function Format-SyntaxCommonParameters { - # After ProgressAction is removed, '[]' is collapsed back inline. - # PlatyPS keeps it inline only while the SYNTAX line stays within its wrap width - # (~110 chars, measured from prior generated output) and otherwise wraps it onto its - # own continuation line. Reproduce that so we neither leave overly long lines nor - # dangling orphans. Only lines that still carry content before the token are wrapped; - # lines that are already just ' []' are left untouched. - param([string] $Content, [int] $MaxWidth = 110) - - $eol = if ($Content -match "`r`n") { "`r`n" } else { "`n" } - $lines = $Content -split "`r?`n" - $out = [System.Collections.Generic.List[string]]::new() - foreach ($line in $lines) { - if ($line.Length -gt $MaxWidth -and $line -match '\S[ ]\[\][ ]*$') { - $head = $line -replace '[ ]*\[\][ ]*$', '' - $out.Add($head) - $out.Add(' []') - } - else { - $out.Add($line) - } - } - return ($out -join $eol) -} - # ----------------------------------------------------------------------------- # Post-process the generated MDX: -# * Strip the spurious ProgressAction common parameter that PlatyPS emits on -# PowerShell 7.4+ (https://github.com/PowerShell/platyPS/issues/663). Pester 6 -# loads a .NET 8 assembly and therefore requires PowerShell 7.4+, so the docs -# can no longer be generated on an older PowerShell to avoid this. # * Repair the mismatched code fences PlatyPS emits for .EXAMPLE blocks that # contain their own Markdown fences (see Repair-ExampleFences) so the MDX # compiles. -# The '[]' SYNTAX entry and the '### CommonParameters' section are -# kept as PlatyPS produces them. Because the ProgressAction token is longer than -# '[]' and always sits right before it, removing ProgressAction can -# leave '[]' orphaned on a wrapped continuation line. The first -# replacement handles that case by pulling '[]' back onto the line -# ProgressAction occupied; the second removes any remaining ProgressAction token, -# whether inline or wrapped onto its own line. Format-SyntaxCommonParameters then wraps -# '[]' back onto its own line where the result would exceed PlatyPS's -# syntax wrap width, matching the layout PlatyPS produces without ProgressAction. # ----------------------------------------------------------------------------- -# Write-Host 'Post-processing generated MDX files (ProgressAction, example fences)' -ForegroundColor Magenta -# $commandsFolder = Join-Path -Path $docusaurusOptions.DocsFolder -ChildPath $docusaurusOptions.Sidebar -# Get-ChildItem -Path $commandsFolder -Filter '*.mdx' | ForEach-Object { -# $content = Get-Content -LiteralPath $_.FullName -Raw -# # Pull '[]' back up when removing ProgressAction would orphan it -# $updated = $content -replace '[ ]*\[-ProgressAction \][ ]*\r?\n[ ]*\[\]', ' []' -# # Remove any remaining ' [-ProgressAction ]' from the SYNTAX code-blocks -# $updated = $updated -replace '[ ]*(\r?\n[ ]*)?\[-ProgressAction \]', '' -# # Remove the dedicated '### -ProgressAction' section up to the next '### ' heading -# $updated = $updated -replace '(?ms)^### -ProgressAction\r?\n.*?(?=^### )', '' -# # Re-wrap '[]' onto its own line where the SYNTAX line is too long -# $updated = Format-SyntaxCommonParameters -Content $updated -# # Fix mismatched code fences inside the EXAMPLES section -# $updated = Repair-ExampleFences -Content $updated -# if ($updated -ne $content) { -# Set-Content -LiteralPath $_.FullName -Value $updated -NoNewline -Encoding utf8 -# } -# } +Write-Host 'Post-processing generated MDX files (ProgressAction, example fences)' -ForegroundColor Magenta +$commandsFolder = Join-Path -Path $docusaurusOptions.DocsFolder -ChildPath $docusaurusOptions.Sidebar +Get-ChildItem -Path $commandsFolder -Filter '*.mdx' | ForEach-Object { + $content = Get-Content -LiteralPath $_.FullName -Raw + # Fix mismatched code fences inside the EXAMPLES section + $updated = Repair-ExampleFences -Content $content + if ($updated -ne $content) { + Set-Content -LiteralPath $_.FullName -Value $updated -NoNewline -Encoding utf8 + } +} Write-Host 'Render completed successfully' -BackgroundColor DarkGreen Pop-Location From a759f497304d27180f6b1cd6ebd92364bb9766d8 Mon Sep 17 00:00:00 2001 From: Frode Flaten <3436158+fflaten@users.noreply.github.com> Date: Thu, 16 Jul 2026 21:06:39 +0000 Subject: [PATCH 03/17] Execute post-processing --- docs/commands/Set-ItResult.mdx | 2 +- docs/commands/Should-BeEquivalent.mdx | 2 -- generate-command-reference.ps1 | 10 ++-------- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/docs/commands/Set-ItResult.mdx b/docs/commands/Set-ItResult.mdx index f674cf81..6ba4c833 100644 --- a/docs/commands/Set-ItResult.mdx +++ b/docs/commands/Set-ItResult.mdx @@ -58,7 +58,7 @@ Describe "Example" { the output should be -``` +```powershell Describing Example [?] Inconclusive test is inconclusive, because we want it to be inconclusive 35ms [!] Skipped test is skipped, because we want it to be skipped 3ms diff --git a/docs/commands/Should-BeEquivalent.mdx b/docs/commands/Should-BeEquivalent.mdx index 36aab66a..4af9a2b3 100644 --- a/docs/commands/Should-BeEquivalent.mdx +++ b/docs/commands/Should-BeEquivalent.mdx @@ -45,10 +45,8 @@ This example generates an equivalency option object that excludes the 'Id' and ' ### EXAMPLE 2 ```powershell -```powereshell Should-BeEquivalent ... -ExcludePathsNotOnExpected ``` -``` This example generates an equivalency option object that excludes any paths not present on the expected object from the comparison, using the default deep comparison strategy. diff --git a/generate-command-reference.ps1 b/generate-command-reference.ps1 index bbfef2c5..19e052e8 100644 --- a/generate-command-reference.ps1 +++ b/generate-command-reference.ps1 @@ -121,13 +121,6 @@ New-DocusaurusHelp @docusaurusOptions function Repair-ExampleFences { <# - Pester's source comment-based help embeds Markdown code fences (```powershell - ... ```), including a 'powereshell' typo, inside its .EXAMPLE blocks. PlatyPS - double-wraps these, emitting mismatched fences - a bare ``` opening paired with - a ```powershell "closing" fence, sometimes doubled up. MDX 3 then mispairs the - fences, treating an example's PowerShell '@{ ... }' as a JSX expression, which - breaks the Docusaurus build ("Could not parse expression with acorn"). - Normalize fences inside the EXAMPLES section only: collapse runs of adjacent fence lines and alternate them open/close per example, so each example becomes a single well-formed ```powershell code block followed by its description. The @@ -177,7 +170,7 @@ function Repair-ExampleFences { } if (-not $inCode) { $lang = $langs | Where-Object { $_ -ne '' } | Select-Object -First 1 - if (-not $lang -or $lang -eq 'powereshell') { $lang = 'powershell' } + if (-not $lang) { $lang = 'powershell' } $result.Add('```' + $lang) $inCode = $true } @@ -205,6 +198,7 @@ $commandsFolder = Join-Path -Path $docusaurusOptions.DocsFolder -ChildPath $docu Get-ChildItem -Path $commandsFolder -Filter '*.mdx' | ForEach-Object { $content = Get-Content -LiteralPath $_.FullName -Raw # Fix mismatched code fences inside the EXAMPLES section + # TODO: Remove? Not really needed. Only fixed two earlier typos in pester/pester repo. $updated = Repair-ExampleFences -Content $content if ($updated -ne $content) { Set-Content -LiteralPath $_.FullName -Value $updated -NoNewline -Encoding utf8 From 52f94c8941efa2caf72a60b017f2b66acb6da344 Mon Sep 17 00:00:00 2001 From: Frode Flaten <3436158+fflaten@users.noreply.github.com> Date: Fri, 17 Jul 2026 09:30:58 +0000 Subject: [PATCH 04/17] Update latest preview --- 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 | 4 +- docs/commands/InModuleScope.mdx | 2 +- docs/commands/Invoke-Pester.mdx | 2 +- docs/commands/It.mdx | 2 +- docs/commands/Mock.mdx | 2 +- 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/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 | 2 +- docs/commands/Should-BeBefore.mdx | 2 +- docs/commands/Should-BeCollection.mdx | 2 +- docs/commands/Should-BeEmptyString.mdx | 2 +- docs/commands/Should-BeEquivalent.mdx | 2 +- docs/commands/Should-BeFalse.mdx | 2 +- docs/commands/Should-BeFalsy.mdx | 2 +- docs/commands/Should-BeFasterThan.mdx | 2 +- docs/commands/Should-BeGreaterThan.mdx | 2 +- docs/commands/Should-BeGreaterThanOrEqual.mdx | 2 +- docs/commands/Should-BeHashtable.mdx | 2 +- docs/commands/Should-BeLessThan.mdx | 2 +- docs/commands/Should-BeLessThanOrEqual.mdx | 2 +- docs/commands/Should-BeLikeString.mdx | 2 +- docs/commands/Should-BeNull.mdx | 2 +- docs/commands/Should-BeSame.mdx | 2 +- docs/commands/Should-BeSlowerThan.mdx | 2 +- docs/commands/Should-BeString.mdx | 2 +- docs/commands/Should-BeTrue.mdx | 2 +- docs/commands/Should-BeTruthy.mdx | 2 +- docs/commands/Should-ContainCollection.mdx | 2 +- docs/commands/Should-HaveParameter.mdx | 2 +- docs/commands/Should-HaveType.mdx | 2 +- 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 | 2 +- docs/commands/Should-NotBeSame.mdx | 2 +- docs/commands/Should-NotBeString.mdx | 2 +- .../commands/Should-NotBeWhiteSpaceString.mdx | 2 +- docs/commands/Should-NotContainCollection.mdx | 2 +- docs/commands/Should-NotHaveParameter.mdx | 2 +- docs/commands/Should-NotHaveType.mdx | 2 +- docs/commands/Should-NotInvoke.mdx | 2 +- docs/commands/Should-NotMatchString.mdx | 2 +- docs/commands/Should-Throw.mdx | 2 +- docs/commands/Should.mdx | 175 +++++++++++++++++- generate-command-reference.ps1 | 18 +- 66 files changed, 248 insertions(+), 75 deletions(-) diff --git a/docs/commands/Add-ShouldOperator.mdx b/docs/commands/Add-ShouldOperator.mdx index 9a21df2f..3d4ec82e 100644 --- a/docs/commands/Add-ShouldOperator.mdx +++ b/docs/commands/Add-ShouldOperator.mdx @@ -1,7 +1,7 @@ --- id: Add-ShouldOperator title: Add-ShouldOperator -description: Help page for the PowerShell Pester "Add-ShouldOperator" command +description: Help page for the PowerShell Pester 'Add-ShouldOperator' command - Register a Should Operator with Pester keywords: - PowerShell - Pester diff --git a/docs/commands/AfterAll.mdx b/docs/commands/AfterAll.mdx index 71bceb77..6f38dbac 100644 --- a/docs/commands/AfterAll.mdx +++ b/docs/commands/AfterAll.mdx @@ -1,7 +1,7 @@ --- id: AfterAll title: AfterAll -description: Help page for the PowerShell Pester "AfterAll" command +description: Help page for the PowerShell Pester 'AfterAll' command - Defines a series of steps to perform at the end of the current container,Context or Describe block. keywords: - PowerShell - Pester diff --git a/docs/commands/AfterEach.mdx b/docs/commands/AfterEach.mdx index 019a9103..28d40da9 100644 --- a/docs/commands/AfterEach.mdx +++ b/docs/commands/AfterEach.mdx @@ -1,7 +1,7 @@ --- id: AfterEach title: AfterEach -description: Help page for the PowerShell Pester "AfterEach" command +description: Help page for the PowerShell Pester 'AfterEach' command - Defines a series of steps to perform at the end of every It block withinthe current Context or Describe block. keywords: - PowerShell - Pester diff --git a/docs/commands/BeforeAll.mdx b/docs/commands/BeforeAll.mdx index e2e5483b..964c707a 100644 --- a/docs/commands/BeforeAll.mdx +++ b/docs/commands/BeforeAll.mdx @@ -1,7 +1,7 @@ --- id: BeforeAll title: BeforeAll -description: Help page for the PowerShell Pester "BeforeAll" command +description: Help page for the PowerShell Pester 'BeforeAll' command - Defines a series of steps to perform at the beginning of the current container,Context or Describe block. keywords: - PowerShell - Pester diff --git a/docs/commands/BeforeDiscovery.mdx b/docs/commands/BeforeDiscovery.mdx index d2d81af3..8a688bc2 100644 --- a/docs/commands/BeforeDiscovery.mdx +++ b/docs/commands/BeforeDiscovery.mdx @@ -1,7 +1,7 @@ --- id: BeforeDiscovery title: BeforeDiscovery -description: Help page for the PowerShell Pester "BeforeDiscovery" command +description: Help page for the PowerShell Pester 'BeforeDiscovery' command - Runs setup code that is used during Discovery phase. keywords: - PowerShell - Pester diff --git a/docs/commands/BeforeEach.mdx b/docs/commands/BeforeEach.mdx index bfc9c644..796df728 100644 --- a/docs/commands/BeforeEach.mdx +++ b/docs/commands/BeforeEach.mdx @@ -1,7 +1,7 @@ --- id: BeforeEach title: BeforeEach -description: Help page for the PowerShell Pester "BeforeEach" command +description: Help page for the PowerShell Pester 'BeforeEach' command - Defines a series of steps to perform at the beginning of every It block withinthe current Context or Describe block. keywords: - PowerShell - Pester diff --git a/docs/commands/Context.mdx b/docs/commands/Context.mdx index 659db79a..226ac9da 100644 --- a/docs/commands/Context.mdx +++ b/docs/commands/Context.mdx @@ -1,7 +1,7 @@ --- id: Context title: Context -description: Help page for the PowerShell Pester "Context" command +description: Help page for the PowerShell Pester 'Context' command - Provides logical grouping of It blocks within a single Describe block. keywords: - PowerShell - Pester diff --git a/docs/commands/ConvertTo-JUnitReport.mdx b/docs/commands/ConvertTo-JUnitReport.mdx index 97d749c0..3d887a97 100644 --- a/docs/commands/ConvertTo-JUnitReport.mdx +++ b/docs/commands/ConvertTo-JUnitReport.mdx @@ -1,7 +1,7 @@ --- id: ConvertTo-JUnitReport title: ConvertTo-JUnitReport -description: Help page for the PowerShell Pester "ConvertTo-JUnitReport" command +description: Help page for the PowerShell Pester 'ConvertTo-JUnitReport' command - Converts a Pester result-object to an JUnit-compatible XML report keywords: - PowerShell - Pester diff --git a/docs/commands/ConvertTo-NUnitReport.mdx b/docs/commands/ConvertTo-NUnitReport.mdx index e17e5395..e4330856 100644 --- a/docs/commands/ConvertTo-NUnitReport.mdx +++ b/docs/commands/ConvertTo-NUnitReport.mdx @@ -1,7 +1,7 @@ --- id: ConvertTo-NUnitReport title: ConvertTo-NUnitReport -description: Help page for the PowerShell Pester "ConvertTo-NUnitReport" command +description: Help page for the PowerShell Pester 'ConvertTo-NUnitReport' command - Converts a Pester result-object to an NUnit 2.5 or 3-compatible XML-report keywords: - PowerShell - Pester diff --git a/docs/commands/ConvertTo-Pester4Result.mdx b/docs/commands/ConvertTo-Pester4Result.mdx index a720534a..33ff522f 100644 --- a/docs/commands/ConvertTo-Pester4Result.mdx +++ b/docs/commands/ConvertTo-Pester4Result.mdx @@ -1,7 +1,7 @@ --- id: ConvertTo-Pester4Result title: ConvertTo-Pester4Result -description: Help page for the PowerShell Pester "ConvertTo-Pester4Result" command +description: Help page for the PowerShell Pester 'ConvertTo-Pester4Result' command - Converts a Pester 5 result-object to an Pester 4-compatible object keywords: - PowerShell - Pester diff --git a/docs/commands/Describe.mdx b/docs/commands/Describe.mdx index 2bfa060e..aa0e4992 100644 --- a/docs/commands/Describe.mdx +++ b/docs/commands/Describe.mdx @@ -1,7 +1,7 @@ --- id: Describe title: Describe -description: Help page for the PowerShell Pester "Describe" command +description: Help page for the PowerShell Pester 'Describe' command - Creates a logical group of tests. keywords: - PowerShell - Pester diff --git a/docs/commands/Export-JUnitReport.mdx b/docs/commands/Export-JUnitReport.mdx index 4f0418ab..14cd8e35 100644 --- a/docs/commands/Export-JUnitReport.mdx +++ b/docs/commands/Export-JUnitReport.mdx @@ -1,7 +1,7 @@ --- id: Export-JUnitReport title: Export-JUnitReport -description: Help page for the PowerShell Pester "Export-JUnitReport" command +description: Help page for the PowerShell Pester 'Export-JUnitReport' command - Exports a Pester result-object to an JUnit-compatible XML-report keywords: - PowerShell - Pester diff --git a/docs/commands/Export-NUnitReport.mdx b/docs/commands/Export-NUnitReport.mdx index f2537329..b1e662a0 100644 --- a/docs/commands/Export-NUnitReport.mdx +++ b/docs/commands/Export-NUnitReport.mdx @@ -1,7 +1,7 @@ --- id: Export-NUnitReport title: Export-NUnitReport -description: Help page for the PowerShell Pester "Export-NUnitReport" command +description: Help page for the PowerShell Pester 'Export-NUnitReport' command - Exports a Pester result-object to an NUnit-compatible XML-report keywords: - PowerShell - Pester diff --git a/docs/commands/Get-ShouldOperator.mdx b/docs/commands/Get-ShouldOperator.mdx index e7f45104..297a8f3b 100644 --- a/docs/commands/Get-ShouldOperator.mdx +++ b/docs/commands/Get-ShouldOperator.mdx @@ -1,7 +1,7 @@ --- id: Get-ShouldOperator title: Get-ShouldOperator -description: Help page for the PowerShell Pester "Get-ShouldOperator" command +description: Help page for the PowerShell Pester 'Get-ShouldOperator' command - Display the assertion operators available for use with Should. keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Display the assertion operators available for use with Should. ## SYNTAX ```powershell -Get-ShouldOperator +Get-ShouldOperator [[-Name] ] ``` ## DESCRIPTION diff --git a/docs/commands/InModuleScope.mdx b/docs/commands/InModuleScope.mdx index fba5142e..a637586e 100644 --- a/docs/commands/InModuleScope.mdx +++ b/docs/commands/InModuleScope.mdx @@ -1,7 +1,7 @@ --- id: InModuleScope title: InModuleScope -description: Help page for the PowerShell Pester "InModuleScope" command +description: Help page for the PowerShell Pester 'InModuleScope' command - Allows you to execute parts of a test script within thescope of a PowerShell script or manifest module. keywords: - PowerShell - Pester diff --git a/docs/commands/Invoke-Pester.mdx b/docs/commands/Invoke-Pester.mdx index 42e32966..bbabba9d 100644 --- a/docs/commands/Invoke-Pester.mdx +++ b/docs/commands/Invoke-Pester.mdx @@ -1,7 +1,7 @@ --- id: Invoke-Pester title: Invoke-Pester -description: Help page for the PowerShell Pester "Invoke-Pester" command +description: Help page for the PowerShell Pester 'Invoke-Pester' command - Runs Pester tests keywords: - PowerShell - Pester diff --git a/docs/commands/It.mdx b/docs/commands/It.mdx index cb8eaf01..a1903095 100644 --- a/docs/commands/It.mdx +++ b/docs/commands/It.mdx @@ -1,7 +1,7 @@ --- id: It title: It -description: Help page for the PowerShell Pester "It" command +description: Help page for the PowerShell Pester 'It' command - Validates the results of a test inside of a Describe block. keywords: - PowerShell - Pester diff --git a/docs/commands/Mock.mdx b/docs/commands/Mock.mdx index adee2588..1217af8b 100644 --- a/docs/commands/Mock.mdx +++ b/docs/commands/Mock.mdx @@ -1,7 +1,7 @@ --- id: Mock title: Mock -description: Help page for the PowerShell Pester "Mock" command +description: Help page for the PowerShell Pester 'Mock' command - Mocks the behavior of an existing command with an alternateimplementation. keywords: - PowerShell - Pester diff --git a/docs/commands/New-Fixture.mdx b/docs/commands/New-Fixture.mdx index 7445a921..88751338 100644 --- a/docs/commands/New-Fixture.mdx +++ b/docs/commands/New-Fixture.mdx @@ -1,7 +1,7 @@ --- id: New-Fixture title: New-Fixture -description: Help page for the PowerShell Pester "New-Fixture" command +description: Help page for the PowerShell Pester 'New-Fixture' command - This function generates two scripts, one that defines a functionand another one that contains its tests. keywords: - PowerShell - Pester diff --git a/docs/commands/New-MockObject.mdx b/docs/commands/New-MockObject.mdx index 84e27308..24930c64 100644 --- a/docs/commands/New-MockObject.mdx +++ b/docs/commands/New-MockObject.mdx @@ -1,7 +1,7 @@ --- id: New-MockObject title: New-MockObject -description: Help page for the PowerShell Pester "New-MockObject" command +description: Help page for the PowerShell Pester 'New-MockObject' command - This function instantiates a .NET object from a type. keywords: - PowerShell - Pester diff --git a/docs/commands/New-PesterConfiguration.mdx b/docs/commands/New-PesterConfiguration.mdx index ff78ccc5..7d9e6d8c 100644 --- a/docs/commands/New-PesterConfiguration.mdx +++ b/docs/commands/New-PesterConfiguration.mdx @@ -1,7 +1,7 @@ --- id: New-PesterConfiguration title: New-PesterConfiguration -description: Help page for the PowerShell Pester "New-PesterConfiguration" command +description: Help page for the PowerShell Pester 'New-PesterConfiguration' command - Creates a new PesterConfiguration object for advanced configuration of Invoke-Pester. keywords: - PowerShell - Pester diff --git a/docs/commands/New-PesterContainer.mdx b/docs/commands/New-PesterContainer.mdx index c234b1f9..cc3d75dd 100644 --- a/docs/commands/New-PesterContainer.mdx +++ b/docs/commands/New-PesterContainer.mdx @@ -1,7 +1,7 @@ --- id: New-PesterContainer title: New-PesterContainer -description: Help page for the PowerShell Pester "New-PesterContainer" command +description: Help page for the PowerShell Pester 'New-PesterContainer' command - Generates ContainerInfo-objects used as for Invoke-Pester -Container keywords: - PowerShell - Pester diff --git a/docs/commands/Set-ItResult.mdx b/docs/commands/Set-ItResult.mdx index 6ba4c833..a1b0e18d 100644 --- a/docs/commands/Set-ItResult.mdx +++ b/docs/commands/Set-ItResult.mdx @@ -1,7 +1,7 @@ --- id: Set-ItResult title: Set-ItResult -description: Help page for the PowerShell Pester "Set-ItResult" command +description: Help page for the PowerShell Pester 'Set-ItResult' command - Set-ItResult is used inside the It block to explicitly set the test result keywords: - PowerShell - Pester diff --git a/docs/commands/Should-All.mdx b/docs/commands/Should-All.mdx index d3bc82a0..a8b6591a 100644 --- a/docs/commands/Should-All.mdx +++ b/docs/commands/Should-All.mdx @@ -1,7 +1,7 @@ --- id: Should-All title: Should-All -description: Help page for the PowerShell Pester "Should-All" command +description: Help page for the PowerShell Pester 'Should-All' command - Compares all items in a collection to a filter script. If the filter returns true, or does not throw for all the items in the collection, the assertion passes. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-Any.mdx b/docs/commands/Should-Any.mdx index fa4743b1..f4898b0a 100644 --- a/docs/commands/Should-Any.mdx +++ b/docs/commands/Should-Any.mdx @@ -1,7 +1,7 @@ --- id: Should-Any title: Should-Any -description: Help page for the PowerShell Pester "Should-Any" command +description: Help page for the PowerShell Pester 'Should-Any' command - Compares all items in a collection to a filter script. If the filter returns true, or does not throw for any of the items in the collection, the assertion passes. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-Be.mdx b/docs/commands/Should-Be.mdx index 84cc230d..4f2b0409 100644 --- a/docs/commands/Should-Be.mdx +++ b/docs/commands/Should-Be.mdx @@ -1,7 +1,7 @@ --- id: Should-Be title: Should-Be -description: Help page for the PowerShell Pester "Should-Be" command +description: Help page for the PowerShell Pester 'Should-Be' command - Compares the expected value to actual value, to see if they are equal. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeAfter.mdx b/docs/commands/Should-BeAfter.mdx index a7b73271..50c0dbbb 100644 --- a/docs/commands/Should-BeAfter.mdx +++ b/docs/commands/Should-BeAfter.mdx @@ -1,7 +1,7 @@ --- id: Should-BeAfter title: Should-BeAfter -description: Help page for the PowerShell Pester "Should-BeAfter" command +description: Help page for the PowerShell Pester 'Should-BeAfter' command - Asserts that the provided [datetime] is after the expected [datetime]. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeBefore.mdx b/docs/commands/Should-BeBefore.mdx index a44fc34f..088c5267 100644 --- a/docs/commands/Should-BeBefore.mdx +++ b/docs/commands/Should-BeBefore.mdx @@ -1,7 +1,7 @@ --- id: Should-BeBefore title: Should-BeBefore -description: Help page for the PowerShell Pester "Should-BeBefore" command +description: Help page for the PowerShell Pester 'Should-BeBefore' command - Asserts that the provided [datetime] is before the expected [datetime]. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeCollection.mdx b/docs/commands/Should-BeCollection.mdx index 4846453b..61230a40 100644 --- a/docs/commands/Should-BeCollection.mdx +++ b/docs/commands/Should-BeCollection.mdx @@ -1,7 +1,7 @@ --- id: Should-BeCollection title: Should-BeCollection -description: Help page for the PowerShell Pester "Should-BeCollection" command +description: Help page for the PowerShell Pester 'Should-BeCollection' command - Compares collections for equality, by comparing their sizes and each item in them. It does not compare the types of the input collections. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeEmptyString.mdx b/docs/commands/Should-BeEmptyString.mdx index 78e11771..76e4021c 100644 --- a/docs/commands/Should-BeEmptyString.mdx +++ b/docs/commands/Should-BeEmptyString.mdx @@ -1,7 +1,7 @@ --- id: Should-BeEmptyString title: Should-BeEmptyString -description: Help page for the PowerShell Pester "Should-BeEmptyString" command +description: Help page for the PowerShell Pester 'Should-BeEmptyString' command - Ensures that input is an empty string. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeEquivalent.mdx b/docs/commands/Should-BeEquivalent.mdx index 4af9a2b3..d9b1c7dc 100644 --- a/docs/commands/Should-BeEquivalent.mdx +++ b/docs/commands/Should-BeEquivalent.mdx @@ -1,7 +1,7 @@ --- id: Should-BeEquivalent title: Should-BeEquivalent -description: Help page for the PowerShell Pester "Should-BeEquivalent" command +description: Help page for the PowerShell Pester 'Should-BeEquivalent' command - Compares two objects for equivalency, by recursively comparing their properties for equivalency. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeFalse.mdx b/docs/commands/Should-BeFalse.mdx index d1049cbf..f86661ca 100644 --- a/docs/commands/Should-BeFalse.mdx +++ b/docs/commands/Should-BeFalse.mdx @@ -1,7 +1,7 @@ --- id: Should-BeFalse title: Should-BeFalse -description: Help page for the PowerShell Pester "Should-BeFalse" command +description: Help page for the PowerShell Pester 'Should-BeFalse' command - Compares the actual value to a boolean $false. It does not convert input values to boolean, and will fail for any value that is not $false. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeFalsy.mdx b/docs/commands/Should-BeFalsy.mdx index 9a1c31b8..e0ddd78f 100644 --- a/docs/commands/Should-BeFalsy.mdx +++ b/docs/commands/Should-BeFalsy.mdx @@ -1,7 +1,7 @@ --- id: Should-BeFalsy title: Should-BeFalsy -description: Help page for the PowerShell Pester "Should-BeFalsy" command +description: "Help page for the PowerShell Pester 'Should-BeFalsy' command - Compares the actual value to a boolean $false or a falsy value: 0, \"\", $null or @(). It converts the input value to a boolean." keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeFasterThan.mdx b/docs/commands/Should-BeFasterThan.mdx index 150a2780..6be9f839 100644 --- a/docs/commands/Should-BeFasterThan.mdx +++ b/docs/commands/Should-BeFasterThan.mdx @@ -1,7 +1,7 @@ --- id: Should-BeFasterThan title: Should-BeFasterThan -description: Help page for the PowerShell Pester "Should-BeFasterThan" command +description: Help page for the PowerShell Pester 'Should-BeFasterThan' command - Asserts that the provided [timespan] or [scriptblock] is faster than the expected [timespan]. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeGreaterThan.mdx b/docs/commands/Should-BeGreaterThan.mdx index 52d36fb0..c9df5221 100644 --- a/docs/commands/Should-BeGreaterThan.mdx +++ b/docs/commands/Should-BeGreaterThan.mdx @@ -1,7 +1,7 @@ --- id: Should-BeGreaterThan title: Should-BeGreaterThan -description: Help page for the PowerShell Pester "Should-BeGreaterThan" command +description: Help page for the PowerShell Pester 'Should-BeGreaterThan' command - Compares the expected value to actual value, to see if the actual value is greater than the expected value. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeGreaterThanOrEqual.mdx b/docs/commands/Should-BeGreaterThanOrEqual.mdx index ef637145..ae759ae2 100644 --- a/docs/commands/Should-BeGreaterThanOrEqual.mdx +++ b/docs/commands/Should-BeGreaterThanOrEqual.mdx @@ -1,7 +1,7 @@ --- id: Should-BeGreaterThanOrEqual title: Should-BeGreaterThanOrEqual -description: Help page for the PowerShell Pester "Should-BeGreaterThanOrEqual" command +description: Help page for the PowerShell Pester 'Should-BeGreaterThanOrEqual' command - Compares the expected value to actual value, to see if the actual value is greater than or equal to the expected value. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeHashtable.mdx b/docs/commands/Should-BeHashtable.mdx index 64e9943f..d92effad 100644 --- a/docs/commands/Should-BeHashtable.mdx +++ b/docs/commands/Should-BeHashtable.mdx @@ -1,7 +1,7 @@ --- id: Should-BeHashtable title: Should-BeHashtable -description: Help page for the PowerShell Pester "Should-BeHashtable" command +description: Help page for the PowerShell Pester 'Should-BeHashtable' command - Asserts that the input is a hashtable or dictionary, and optionally checks the number ofentries, whether it is ordered, and that it contains specific keys. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeLessThan.mdx b/docs/commands/Should-BeLessThan.mdx index d508a1a1..09cffa49 100644 --- a/docs/commands/Should-BeLessThan.mdx +++ b/docs/commands/Should-BeLessThan.mdx @@ -1,7 +1,7 @@ --- id: Should-BeLessThan title: Should-BeLessThan -description: Help page for the PowerShell Pester "Should-BeLessThan" command +description: Help page for the PowerShell Pester 'Should-BeLessThan' command - Compares the expected value to actual value, to see if the actual value is less than the expected value. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeLessThanOrEqual.mdx b/docs/commands/Should-BeLessThanOrEqual.mdx index db9b456f..a33ea2b3 100644 --- a/docs/commands/Should-BeLessThanOrEqual.mdx +++ b/docs/commands/Should-BeLessThanOrEqual.mdx @@ -1,7 +1,7 @@ --- id: Should-BeLessThanOrEqual title: Should-BeLessThanOrEqual -description: Help page for the PowerShell Pester "Should-BeLessThanOrEqual" command +description: Help page for the PowerShell Pester 'Should-BeLessThanOrEqual' command - Compares the expected value to actual value, to see if the actual value is less than or equal to the expected value. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeLikeString.mdx b/docs/commands/Should-BeLikeString.mdx index 02c32396..c790e648 100644 --- a/docs/commands/Should-BeLikeString.mdx +++ b/docs/commands/Should-BeLikeString.mdx @@ -1,7 +1,7 @@ --- id: Should-BeLikeString title: Should-BeLikeString -description: Help page for the PowerShell Pester "Should-BeLikeString" command +description: Help page for the PowerShell Pester 'Should-BeLikeString' command - Asserts that the actual value is like the expected value. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeNull.mdx b/docs/commands/Should-BeNull.mdx index b78c7961..ee96e48c 100644 --- a/docs/commands/Should-BeNull.mdx +++ b/docs/commands/Should-BeNull.mdx @@ -1,7 +1,7 @@ --- id: Should-BeNull title: Should-BeNull -description: Help page for the PowerShell Pester "Should-BeNull" command +description: Help page for the PowerShell Pester 'Should-BeNull' command - Asserts that the input is `$null`. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeSame.mdx b/docs/commands/Should-BeSame.mdx index ef646742..8339e952 100644 --- a/docs/commands/Should-BeSame.mdx +++ b/docs/commands/Should-BeSame.mdx @@ -1,7 +1,7 @@ --- id: Should-BeSame title: Should-BeSame -description: Help page for the PowerShell Pester "Should-BeSame" command +description: Help page for the PowerShell Pester 'Should-BeSame' command - Compares the expected value to actual value, to see if they are the same instance. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeSlowerThan.mdx b/docs/commands/Should-BeSlowerThan.mdx index 2991baae..4cc7b3bb 100644 --- a/docs/commands/Should-BeSlowerThan.mdx +++ b/docs/commands/Should-BeSlowerThan.mdx @@ -1,7 +1,7 @@ --- id: Should-BeSlowerThan title: Should-BeSlowerThan -description: Help page for the PowerShell Pester "Should-BeSlowerThan" command +description: Help page for the PowerShell Pester 'Should-BeSlowerThan' command - Asserts that the provided [timespan] is slower than the expected [timespan]. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeString.mdx b/docs/commands/Should-BeString.mdx index b26c4850..e49f2ce1 100644 --- a/docs/commands/Should-BeString.mdx +++ b/docs/commands/Should-BeString.mdx @@ -1,7 +1,7 @@ --- id: Should-BeString title: Should-BeString -description: Help page for the PowerShell Pester "Should-BeString" command +description: Help page for the PowerShell Pester 'Should-BeString' command - Asserts that the actual value is equal to the expected value. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeTrue.mdx b/docs/commands/Should-BeTrue.mdx index f6c3ff1f..5abdec93 100644 --- a/docs/commands/Should-BeTrue.mdx +++ b/docs/commands/Should-BeTrue.mdx @@ -1,7 +1,7 @@ --- id: Should-BeTrue title: Should-BeTrue -description: Help page for the PowerShell Pester "Should-BeTrue" command +description: Help page for the PowerShell Pester 'Should-BeTrue' command - Compares the actual value to a boolean $true. It does not convert input values to boolean, and will fail for any value is not $true. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeTruthy.mdx b/docs/commands/Should-BeTruthy.mdx index b9ce2c4c..4e4c5f47 100644 --- a/docs/commands/Should-BeTruthy.mdx +++ b/docs/commands/Should-BeTruthy.mdx @@ -1,7 +1,7 @@ --- id: Should-BeTruthy title: Should-BeTruthy -description: Help page for the PowerShell Pester "Should-BeTruthy" command +description: Help page for the PowerShell Pester 'Should-BeTruthy' command - Compares the actual value to a boolean $true. It converts input values to boolean, and will fail for any value is not $true, or truthy. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-ContainCollection.mdx b/docs/commands/Should-ContainCollection.mdx index b621d87f..1a6402fc 100644 --- a/docs/commands/Should-ContainCollection.mdx +++ b/docs/commands/Should-ContainCollection.mdx @@ -1,7 +1,7 @@ --- id: Should-ContainCollection title: Should-ContainCollection -description: Help page for the PowerShell Pester "Should-ContainCollection" command +description: Help page for the PowerShell Pester 'Should-ContainCollection' command - Checks that the expected collection is present in the actual collection as an ordered subsequence. It does not compare the types of the input collections. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-HaveParameter.mdx b/docs/commands/Should-HaveParameter.mdx index 35080107..effaaa9b 100644 --- a/docs/commands/Should-HaveParameter.mdx +++ b/docs/commands/Should-HaveParameter.mdx @@ -1,7 +1,7 @@ --- id: Should-HaveParameter title: Should-HaveParameter -description: Help page for the PowerShell Pester "Should-HaveParameter" command +description: Help page for the PowerShell Pester 'Should-HaveParameter' command - Asserts that a command has the expected parameter. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-HaveType.mdx b/docs/commands/Should-HaveType.mdx index 32c0eb6e..678fbb63 100644 --- a/docs/commands/Should-HaveType.mdx +++ b/docs/commands/Should-HaveType.mdx @@ -1,7 +1,7 @@ --- id: Should-HaveType title: Should-HaveType -description: Help page for the PowerShell Pester "Should-HaveType" command +description: Help page for the PowerShell Pester 'Should-HaveType' command - Asserts that the input is of the expected type. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-Invoke.mdx b/docs/commands/Should-Invoke.mdx index 4b301ea7..5b3a77f0 100644 --- a/docs/commands/Should-Invoke.mdx +++ b/docs/commands/Should-Invoke.mdx @@ -1,7 +1,7 @@ --- id: Should-Invoke title: Should-Invoke -description: Help page for the PowerShell Pester "Should-Invoke" command +description: Help page for the PowerShell Pester 'Should-Invoke' command - Checks if a Mocked command has been called a certain number of timesand throws an exception if it has not. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-MatchString.mdx b/docs/commands/Should-MatchString.mdx index b39f5b6b..956675f2 100644 --- a/docs/commands/Should-MatchString.mdx +++ b/docs/commands/Should-MatchString.mdx @@ -1,7 +1,7 @@ --- id: Should-MatchString title: Should-MatchString -description: Help page for the PowerShell Pester "Should-MatchString" command +description: Help page for the PowerShell Pester 'Should-MatchString' command - Tests whether a string matches a regular expression pattern. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-NotBe.mdx b/docs/commands/Should-NotBe.mdx index c35b1f90..7965dffd 100644 --- a/docs/commands/Should-NotBe.mdx +++ b/docs/commands/Should-NotBe.mdx @@ -1,7 +1,7 @@ --- id: Should-NotBe title: Should-NotBe -description: Help page for the PowerShell Pester "Should-NotBe" command +description: Help page for the PowerShell Pester 'Should-NotBe' command - Compares the expected value to actual value, to see if they are not equal. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-NotBeEmptyString.mdx b/docs/commands/Should-NotBeEmptyString.mdx index 07754da1..82b8538e 100644 --- a/docs/commands/Should-NotBeEmptyString.mdx +++ b/docs/commands/Should-NotBeEmptyString.mdx @@ -1,7 +1,7 @@ --- id: Should-NotBeEmptyString title: Should-NotBeEmptyString -description: Help page for the PowerShell Pester "Should-NotBeEmptyString" command +description: Help page for the PowerShell Pester 'Should-NotBeEmptyString' command - Ensures that the input is a string, and that the input is not $null or empty string. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-NotBeLikeString.mdx b/docs/commands/Should-NotBeLikeString.mdx index 30d27edd..fc9a7d30 100644 --- a/docs/commands/Should-NotBeLikeString.mdx +++ b/docs/commands/Should-NotBeLikeString.mdx @@ -1,7 +1,7 @@ --- id: Should-NotBeLikeString title: Should-NotBeLikeString -description: Help page for the PowerShell Pester "Should-NotBeLikeString" command +description: Help page for the PowerShell Pester 'Should-NotBeLikeString' command - Asserts that the actual value is not like the expected value. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-NotBeNull.mdx b/docs/commands/Should-NotBeNull.mdx index 6d7ab24a..a94cc8c2 100644 --- a/docs/commands/Should-NotBeNull.mdx +++ b/docs/commands/Should-NotBeNull.mdx @@ -1,7 +1,7 @@ --- id: Should-NotBeNull title: Should-NotBeNull -description: Help page for the PowerShell Pester "Should-NotBeNull" command +description: Help page for the PowerShell Pester 'Should-NotBeNull' command - Asserts that the input is not `$null`. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-NotBeSame.mdx b/docs/commands/Should-NotBeSame.mdx index fc09cb61..44402df3 100644 --- a/docs/commands/Should-NotBeSame.mdx +++ b/docs/commands/Should-NotBeSame.mdx @@ -1,7 +1,7 @@ --- id: Should-NotBeSame title: Should-NotBeSame -description: Help page for the PowerShell Pester "Should-NotBeSame" command +description: Help page for the PowerShell Pester 'Should-NotBeSame' command - Compares the expected value to actual value, to see if the actual value is not the same instance as the expected value. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-NotBeString.mdx b/docs/commands/Should-NotBeString.mdx index 2fd4a7aa..14e3b7b0 100644 --- a/docs/commands/Should-NotBeString.mdx +++ b/docs/commands/Should-NotBeString.mdx @@ -1,7 +1,7 @@ --- id: Should-NotBeString title: Should-NotBeString -description: Help page for the PowerShell Pester "Should-NotBeString" command +description: Help page for the PowerShell Pester 'Should-NotBeString' command - Asserts that the actual value is not equal to the expected value. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-NotBeWhiteSpaceString.mdx b/docs/commands/Should-NotBeWhiteSpaceString.mdx index ac8a0086..43a7bdd5 100644 --- a/docs/commands/Should-NotBeWhiteSpaceString.mdx +++ b/docs/commands/Should-NotBeWhiteSpaceString.mdx @@ -1,7 +1,7 @@ --- id: Should-NotBeWhiteSpaceString title: Should-NotBeWhiteSpaceString -description: Help page for the PowerShell Pester "Should-NotBeWhiteSpaceString" command +description: Help page for the PowerShell Pester 'Should-NotBeWhiteSpaceString' command - Ensures that the input is a string, and that the input is not $null, empty, or whitespace only string. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-NotContainCollection.mdx b/docs/commands/Should-NotContainCollection.mdx index 629b9c42..d14ff603 100644 --- a/docs/commands/Should-NotContainCollection.mdx +++ b/docs/commands/Should-NotContainCollection.mdx @@ -1,7 +1,7 @@ --- id: Should-NotContainCollection title: Should-NotContainCollection -description: Help page for the PowerShell Pester "Should-NotContainCollection" command +description: Help page for the PowerShell Pester 'Should-NotContainCollection' command - Checks that the expected collection is not present in the actual collection as an ordered subsequence. It does not compare the types of the input collections. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-NotHaveParameter.mdx b/docs/commands/Should-NotHaveParameter.mdx index e14bf85d..44c39be5 100644 --- a/docs/commands/Should-NotHaveParameter.mdx +++ b/docs/commands/Should-NotHaveParameter.mdx @@ -1,7 +1,7 @@ --- id: Should-NotHaveParameter title: Should-NotHaveParameter -description: Help page for the PowerShell Pester "Should-NotHaveParameter" command +description: Help page for the PowerShell Pester 'Should-NotHaveParameter' command - Asserts that a command has does not have the parameter. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-NotHaveType.mdx b/docs/commands/Should-NotHaveType.mdx index 5a2dc357..abf4456a 100644 --- a/docs/commands/Should-NotHaveType.mdx +++ b/docs/commands/Should-NotHaveType.mdx @@ -1,7 +1,7 @@ --- id: Should-NotHaveType title: Should-NotHaveType -description: Help page for the PowerShell Pester "Should-NotHaveType" command +description: Help page for the PowerShell Pester 'Should-NotHaveType' command - Asserts that the input is not of the expected type. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-NotInvoke.mdx b/docs/commands/Should-NotInvoke.mdx index 61112a46..69c5aaa5 100644 --- a/docs/commands/Should-NotInvoke.mdx +++ b/docs/commands/Should-NotInvoke.mdx @@ -1,7 +1,7 @@ --- id: Should-NotInvoke title: Should-NotInvoke -description: Help page for the PowerShell Pester "Should-NotInvoke" command +description: Help page for the PowerShell Pester 'Should-NotInvoke' command - Checks that mocked command was not called and throws exception if it was. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-NotMatchString.mdx b/docs/commands/Should-NotMatchString.mdx index 5e79fd9a..1ea2e3dc 100644 --- a/docs/commands/Should-NotMatchString.mdx +++ b/docs/commands/Should-NotMatchString.mdx @@ -1,7 +1,7 @@ --- id: Should-NotMatchString title: Should-NotMatchString -description: Help page for the PowerShell Pester "Should-NotMatchString" command +description: Help page for the PowerShell Pester 'Should-NotMatchString' command - Tests whether a string does not match a regular expression pattern. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-Throw.mdx b/docs/commands/Should-Throw.mdx index dfd5c9b5..df1b7471 100644 --- a/docs/commands/Should-Throw.mdx +++ b/docs/commands/Should-Throw.mdx @@ -1,7 +1,7 @@ --- id: Should-Throw title: Should-Throw -description: Help page for the PowerShell Pester "Should-Throw" command +description: Help page for the PowerShell Pester 'Should-Throw' command - Asserts that a script block throws an exception. keywords: - PowerShell - Pester diff --git a/docs/commands/Should.mdx b/docs/commands/Should.mdx index f3f0de23..d4860c1f 100644 --- a/docs/commands/Should.mdx +++ b/docs/commands/Should.mdx @@ -1,7 +1,7 @@ --- id: Should title: Should -description: Help page for the PowerShell Pester "Should" command +description: Help page for the PowerShell Pester 'Should' command - Should is a keyword that is used to define an assertion inside an It block. keywords: - PowerShell - Pester @@ -22,8 +22,179 @@ Should is a keyword that is used to define an assertion inside an It block. ## SYNTAX +### Be + +```powershell +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Be] [-Not] +``` + +### BeExactly + +```powershell +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] + [-BeExactly] +``` + +### BeGreaterThan + +```powershell +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] + [-BeGreaterThan] +``` + +### BeLessOrEqual + +```powershell +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] + [-BeLessOrEqual] +``` + +### BeIn + +```powershell +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] [-BeIn] +``` + +### BeLessThan + +```powershell +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] + [-BeLessThan] +``` + +### BeGreaterOrEqual + +```powershell +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] + [-BeGreaterOrEqual] +``` + +### BeLike + +```powershell +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] [-BeLike] +``` + +### BeLikeExactly + +```powershell +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] + [-BeLikeExactly] +``` + +### BeNullOrEmpty + +```powershell +Should [[-ActualValue] ] [[-Because] ] [-Not] [-BeNullOrEmpty] +``` + +### BeOfType + +```powershell +Should [[-ActualValue] ] [[-ExpectedType] ] [[-Because] ] [-Not] [-BeOfType] +``` + +### BeTrue + +```powershell +Should [[-ActualValue] ] [[-Because] ] [-Not] [-BeTrue] +``` + +### BeFalse + +```powershell +Should [[-ActualValue] ] [[-Because] ] [-Not] [-BeFalse] +``` + +### Contain + +```powershell +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] [-Contain] +``` + +### Exist + +```powershell +Should [[-ActualValue] ] [[-Because] ] [-LiteralPath] [-Not] [-Exist] +``` + +### FileContentMatch + +```powershell +Should [[-ActualValue] ] [[-ExpectedContent] ] [[-Because] ] [-Not] + [-FileContentMatch] +``` + +### FileContentMatchExactly + +```powershell +Should [[-ActualValue] ] [[-ExpectedContent] ] [[-Because] ] [-Not] + [-FileContentMatchExactly] +``` + +### FileContentMatchMultiline + +```powershell +Should [[-ActualValue] ] [[-ExpectedContent] ] [[-Because] ] [-Not] + [-FileContentMatchMultiline] +``` + +### FileContentMatchMultilineExactly + +```powershell +Should [[-ActualValue] ] [[-ExpectedContent] ] [[-Because] ] [-Not] + [-FileContentMatchMultilineExactly] +``` + +### HaveCount + +```powershell +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] + [-HaveCount] +``` + +### HaveParameter + +```powershell +Should [[-ActualValue] ] [[-ParameterName] ] [[-Type] ] + [[-DefaultValue] ] [-Mandatory] [[-InParameterSet] ] [-HasArgumentCompleter] + [[-Alias] ] [[-Because] ] [-Not] [-HaveParameter] +``` + +### Match + +```powershell +Should [[-ActualValue] ] [[-RegularExpression] ] [[-Because] ] [-Not] + [-Match] +``` + +### MatchExactly + +```powershell +Should [[-ActualValue] ] [[-RegularExpression] ] [[-Because] ] [-Not] + [-MatchExactly] +``` + +### Throw + +```powershell +Should [[-ActualValue] ] [[-ExpectedMessage] ] [[-ErrorId] ] + [[-ExceptionType] ] [[-Because] ] [-PassThru] [-Not] [-Throw] +``` + +### InvokeVerifiable + +```powershell +Should [[-ActualValue] ] [[-Because] ] [-Not] [-InvokeVerifiable] +``` + +### Invoke + ```powershell -Should [[-ActualValue] ] +Should [[-ActualValue] ] [[-CommandName] ] [[-Times] ] + [[-ParameterFilter] ] [[-ExclusiveFilter] ] [[-ModuleName] ] + [[-Scope] ] [-Exactly] [[-Because] ] [[-CallerSessionState] ] + [[-CommandDisplayName] ] [-Not] [-Invoke] ``` ## DESCRIPTION diff --git a/generate-command-reference.ps1 b/generate-command-reference.ps1 index 19e052e8..9446f773 100644 --- a/generate-command-reference.ps1 +++ b/generate-command-reference.ps1 @@ -23,8 +23,8 @@ param ( [ValidateSet('Current','v4','v5')] [string] $DocsVersion = 'Current' ) -Set-StrictMode -Version Latest -$PSDefaultParameterValues['*:ErrorAction'] = 'Stop' +# Set-StrictMode -Version Latest +# $PSDefaultParameterValues['*:ErrorAction'] = 'Stop' Write-Host 'Generating MDX files for website Command Reference' -BackgroundColor DarkGreen @@ -32,9 +32,9 @@ Write-Host 'Generating MDX files for website Command Reference' -BackgroundColor # Install required modules # ----------------------------------------------------------------------------- $ModuleList = [ordered]@{ - 'Microsoft.PowerShell.PlatyPS' = $PlatyPSVersion - 'Alt3.Docusaurus.PowerShell' = $DocusaurusVersion - 'Pester' = $PesterVersion + 'Microsoft.PowerShell.PlatyPS' = $PlatyPSVersion + 'Alt3.Docusaurus.PowerShell' = $DocusaurusVersion + 'Pester' = $PesterVersion } # Can't use the original enumerator here because we may modify the dictionary mid-process $ModuleList.Keys.Clone() | ForEach-Object { @@ -72,7 +72,6 @@ $ModuleList.Keys.Clone() | ForEach-Object { # Use below settings to manipulate the rendered MDX files # ----------------------------------------------------------------------------- $docusaurusOptions = @{ - Module = 'Pester' DocsFolder = switch ($DocsVersion) { 'Current' { "$PSScriptRoot/docs" } 'v5' { "$PSScriptRoot/versioned_docs/version-v5" } @@ -86,7 +85,6 @@ $docusaurusOptions = @{ 'SafeGetCommand' 'Set-DynamicParameterVariable' ) - MetaDescription = 'Help page for the PowerShell Pester "%1" command' MetaKeywords = @( 'PowerShell' 'Pester' @@ -117,7 +115,11 @@ if (Test-Path -Path $outputFolder) { } Write-Host 'Generating new MDX files' -ForegroundColor Magenta -New-DocusaurusHelp @docusaurusOptions +$commandHelp = New-CommandHelp -CommandInfo (Get-Command -Module Pester -CommandType Cmdlet, Function) +$commandHelp | ForEach-Object { + $_.Metadata['description'] = "Help page for the PowerShell Pester '$($_.Title)' command - $($_.Synopsis.ReplaceLineEndings(''))" +} +New-DocusaurusHelp @docusaurusOptions -CommandHelp $commandHelp function Repair-ExampleFences { <# From 9a858eb94d98d6e7f0c78edea5b67de9900115d7 Mon Sep 17 00:00:00 2001 From: Frode Flaten <3436158+fflaten@users.noreply.github.com> Date: Fri, 17 Jul 2026 14:07:46 +0000 Subject: [PATCH 05/17] Use Alt3.Docusaurus.PowerShell 2.0 GA and update opengraph description with synopsis --- 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 | 2 +- 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/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 | 2 +- docs/commands/Should-BeBefore.mdx | 2 +- docs/commands/Should-BeCollection.mdx | 2 +- docs/commands/Should-BeEmptyString.mdx | 2 +- docs/commands/Should-BeEquivalent.mdx | 2 +- docs/commands/Should-BeFalse.mdx | 2 +- docs/commands/Should-BeFalsy.mdx | 2 +- docs/commands/Should-BeFasterThan.mdx | 2 +- docs/commands/Should-BeGreaterThan.mdx | 2 +- docs/commands/Should-BeGreaterThanOrEqual.mdx | 2 +- docs/commands/Should-BeHashtable.mdx | 2 +- docs/commands/Should-BeLessThan.mdx | 2 +- docs/commands/Should-BeLessThanOrEqual.mdx | 2 +- docs/commands/Should-BeLikeString.mdx | 2 +- docs/commands/Should-BeNull.mdx | 2 +- docs/commands/Should-BeSame.mdx | 2 +- docs/commands/Should-BeSlowerThan.mdx | 2 +- docs/commands/Should-BeString.mdx | 2 +- docs/commands/Should-BeTrue.mdx | 2 +- docs/commands/Should-BeTruthy.mdx | 2 +- docs/commands/Should-ContainCollection.mdx | 2 +- docs/commands/Should-HaveParameter.mdx | 2 +- docs/commands/Should-HaveType.mdx | 2 +- 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 | 2 +- docs/commands/Should-NotBeSame.mdx | 2 +- docs/commands/Should-NotBeString.mdx | 2 +- .../commands/Should-NotBeWhiteSpaceString.mdx | 2 +- docs/commands/Should-NotContainCollection.mdx | 2 +- docs/commands/Should-NotHaveParameter.mdx | 2 +- docs/commands/Should-NotHaveType.mdx | 2 +- docs/commands/Should-NotInvoke.mdx | 2 +- docs/commands/Should-NotMatchString.mdx | 2 +- docs/commands/Should-Throw.mdx | 2 +- docs/commands/Should.mdx | 2 +- docs/commands/docusaurus.sidebar.js | 2 +- generate-command-reference.ps1 | 38 ++++++++++++++----- 67 files changed, 94 insertions(+), 76 deletions(-) diff --git a/docs/commands/Add-ShouldOperator.mdx b/docs/commands/Add-ShouldOperator.mdx index 3d4ec82e..7ec0625b 100644 --- a/docs/commands/Add-ShouldOperator.mdx +++ b/docs/commands/Add-ShouldOperator.mdx @@ -1,7 +1,7 @@ --- id: Add-ShouldOperator title: Add-ShouldOperator -description: Help page for the PowerShell Pester 'Add-ShouldOperator' command - Register a Should Operator with Pester +description: Help for Pester command 'Add-ShouldOperator'. Register a Should Operator with Pester keywords: - PowerShell - Pester diff --git a/docs/commands/AfterAll.mdx b/docs/commands/AfterAll.mdx index 6f38dbac..b2b95786 100644 --- a/docs/commands/AfterAll.mdx +++ b/docs/commands/AfterAll.mdx @@ -1,7 +1,7 @@ --- id: AfterAll title: AfterAll -description: Help page for the PowerShell Pester 'AfterAll' command - Defines a series of steps to perform at the end of the current container,Context or Describe block. +description: Help for Pester command 'AfterAll'. Defines a series of steps to perform at the end of the current container, Context or Describe block. keywords: - PowerShell - Pester diff --git a/docs/commands/AfterEach.mdx b/docs/commands/AfterEach.mdx index 28d40da9..98380ebd 100644 --- a/docs/commands/AfterEach.mdx +++ b/docs/commands/AfterEach.mdx @@ -1,7 +1,7 @@ --- id: AfterEach title: AfterEach -description: Help page for the PowerShell Pester 'AfterEach' command - Defines a series of steps to perform at the end of every It block withinthe current Context or Describe block. +description: Help for Pester command 'AfterEach'. Defines a series of steps to perform at the end of every It block within the current Context or Describe block. keywords: - PowerShell - Pester diff --git a/docs/commands/BeforeAll.mdx b/docs/commands/BeforeAll.mdx index 964c707a..a4b61aaf 100644 --- a/docs/commands/BeforeAll.mdx +++ b/docs/commands/BeforeAll.mdx @@ -1,7 +1,7 @@ --- id: BeforeAll title: BeforeAll -description: Help page for the PowerShell Pester 'BeforeAll' command - Defines a series of steps to perform at the beginning of the current container,Context or Describe block. +description: Help for Pester command 'BeforeAll'. Defines a series of steps to perform at the beginning of the current container, Context or Describe block. keywords: - PowerShell - Pester diff --git a/docs/commands/BeforeDiscovery.mdx b/docs/commands/BeforeDiscovery.mdx index 8a688bc2..f88a8ef0 100644 --- a/docs/commands/BeforeDiscovery.mdx +++ b/docs/commands/BeforeDiscovery.mdx @@ -1,7 +1,7 @@ --- id: BeforeDiscovery title: BeforeDiscovery -description: Help page for the PowerShell Pester 'BeforeDiscovery' command - Runs setup code that is used during Discovery phase. +description: Help for Pester command 'BeforeDiscovery'. Runs setup code that is used during Discovery phase. keywords: - PowerShell - Pester diff --git a/docs/commands/BeforeEach.mdx b/docs/commands/BeforeEach.mdx index 796df728..f3b3ad21 100644 --- a/docs/commands/BeforeEach.mdx +++ b/docs/commands/BeforeEach.mdx @@ -1,7 +1,7 @@ --- id: BeforeEach title: BeforeEach -description: Help page for the PowerShell Pester 'BeforeEach' command - Defines a series of steps to perform at the beginning of every It block withinthe current Context or Describe block. +description: Help for Pester command 'BeforeEach'. Defines a series of steps to perform at the beginning of every It block within the current Context or Describe block. keywords: - PowerShell - Pester diff --git a/docs/commands/Context.mdx b/docs/commands/Context.mdx index 226ac9da..a51631ee 100644 --- a/docs/commands/Context.mdx +++ b/docs/commands/Context.mdx @@ -1,7 +1,7 @@ --- id: Context title: Context -description: Help page for the PowerShell Pester 'Context' command - Provides logical grouping of It blocks within a single Describe block. +description: Help for Pester command 'Context'. Provides logical grouping of It blocks within a single Describe block. keywords: - PowerShell - Pester diff --git a/docs/commands/ConvertTo-JUnitReport.mdx b/docs/commands/ConvertTo-JUnitReport.mdx index 3d887a97..e75f9ae3 100644 --- a/docs/commands/ConvertTo-JUnitReport.mdx +++ b/docs/commands/ConvertTo-JUnitReport.mdx @@ -1,7 +1,7 @@ --- id: ConvertTo-JUnitReport title: ConvertTo-JUnitReport -description: Help page for the PowerShell Pester 'ConvertTo-JUnitReport' command - Converts a Pester result-object to an JUnit-compatible XML report +description: Help for Pester command 'ConvertTo-JUnitReport'. Converts a Pester result-object to an JUnit-compatible XML report keywords: - PowerShell - Pester diff --git a/docs/commands/ConvertTo-NUnitReport.mdx b/docs/commands/ConvertTo-NUnitReport.mdx index e4330856..981465cb 100644 --- a/docs/commands/ConvertTo-NUnitReport.mdx +++ b/docs/commands/ConvertTo-NUnitReport.mdx @@ -1,7 +1,7 @@ --- id: ConvertTo-NUnitReport title: ConvertTo-NUnitReport -description: Help page for the PowerShell Pester 'ConvertTo-NUnitReport' command - Converts a Pester result-object to an NUnit 2.5 or 3-compatible XML-report +description: Help for Pester command 'ConvertTo-NUnitReport'. Converts a Pester result-object to an NUnit 2.5 or 3-compatible XML-report keywords: - PowerShell - Pester diff --git a/docs/commands/ConvertTo-Pester4Result.mdx b/docs/commands/ConvertTo-Pester4Result.mdx index 33ff522f..a8c39efc 100644 --- a/docs/commands/ConvertTo-Pester4Result.mdx +++ b/docs/commands/ConvertTo-Pester4Result.mdx @@ -1,7 +1,7 @@ --- id: ConvertTo-Pester4Result title: ConvertTo-Pester4Result -description: Help page for the PowerShell Pester 'ConvertTo-Pester4Result' command - Converts a Pester 5 result-object to an Pester 4-compatible object +description: Help for Pester command 'ConvertTo-Pester4Result'. Converts a Pester 5 result-object to an Pester 4-compatible object keywords: - PowerShell - Pester diff --git a/docs/commands/Describe.mdx b/docs/commands/Describe.mdx index aa0e4992..52a1eb7a 100644 --- a/docs/commands/Describe.mdx +++ b/docs/commands/Describe.mdx @@ -1,7 +1,7 @@ --- id: Describe title: Describe -description: Help page for the PowerShell Pester 'Describe' command - Creates a logical group of tests. +description: Help for Pester command 'Describe'. Creates a logical group of tests. keywords: - PowerShell - Pester diff --git a/docs/commands/Export-JUnitReport.mdx b/docs/commands/Export-JUnitReport.mdx index 14cd8e35..a8892d77 100644 --- a/docs/commands/Export-JUnitReport.mdx +++ b/docs/commands/Export-JUnitReport.mdx @@ -1,7 +1,7 @@ --- id: Export-JUnitReport title: Export-JUnitReport -description: Help page for the PowerShell Pester 'Export-JUnitReport' command - Exports a Pester result-object to an JUnit-compatible XML-report +description: Help for Pester command 'Export-JUnitReport'. Exports a Pester result-object to an JUnit-compatible XML-report keywords: - PowerShell - Pester diff --git a/docs/commands/Export-NUnitReport.mdx b/docs/commands/Export-NUnitReport.mdx index b1e662a0..108f76d8 100644 --- a/docs/commands/Export-NUnitReport.mdx +++ b/docs/commands/Export-NUnitReport.mdx @@ -1,7 +1,7 @@ --- id: Export-NUnitReport title: Export-NUnitReport -description: Help page for the PowerShell Pester 'Export-NUnitReport' command - Exports a Pester result-object to an NUnit-compatible XML-report +description: Help for Pester command 'Export-NUnitReport'. Exports a Pester result-object to an NUnit-compatible XML-report keywords: - PowerShell - Pester diff --git a/docs/commands/Get-ShouldOperator.mdx b/docs/commands/Get-ShouldOperator.mdx index 297a8f3b..b75b6ae5 100644 --- a/docs/commands/Get-ShouldOperator.mdx +++ b/docs/commands/Get-ShouldOperator.mdx @@ -1,7 +1,7 @@ --- id: Get-ShouldOperator title: Get-ShouldOperator -description: Help page for the PowerShell Pester 'Get-ShouldOperator' command - Display the assertion operators available for use with Should. +description: Help for Pester command 'Get-ShouldOperator'. Display the assertion operators available for use with Should. keywords: - PowerShell - Pester diff --git a/docs/commands/InModuleScope.mdx b/docs/commands/InModuleScope.mdx index a637586e..e83d321a 100644 --- a/docs/commands/InModuleScope.mdx +++ b/docs/commands/InModuleScope.mdx @@ -1,7 +1,7 @@ --- id: InModuleScope title: InModuleScope -description: Help page for the PowerShell Pester 'InModuleScope' command - Allows you to execute parts of a test script within thescope of a PowerShell script or manifest module. +description: Help for Pester command 'InModuleScope'. Allows you to execute parts of a test script within the scope of a PowerShell script or manifest module. keywords: - PowerShell - Pester diff --git a/docs/commands/Invoke-Pester.mdx b/docs/commands/Invoke-Pester.mdx index bbabba9d..63b3e852 100644 --- a/docs/commands/Invoke-Pester.mdx +++ b/docs/commands/Invoke-Pester.mdx @@ -1,7 +1,7 @@ --- id: Invoke-Pester title: Invoke-Pester -description: Help page for the PowerShell Pester 'Invoke-Pester' command - Runs Pester tests +description: Help for Pester command 'Invoke-Pester'. Runs Pester tests keywords: - PowerShell - Pester diff --git a/docs/commands/It.mdx b/docs/commands/It.mdx index a1903095..5286d519 100644 --- a/docs/commands/It.mdx +++ b/docs/commands/It.mdx @@ -1,7 +1,7 @@ --- id: It title: It -description: Help page for the PowerShell Pester 'It' command - Validates the results of a test inside of a Describe block. +description: Help for Pester command 'It'. Validates the results of a test inside of a Describe block. keywords: - PowerShell - Pester diff --git a/docs/commands/Mock.mdx b/docs/commands/Mock.mdx index 1217af8b..ea15e291 100644 --- a/docs/commands/Mock.mdx +++ b/docs/commands/Mock.mdx @@ -1,7 +1,7 @@ --- id: Mock title: Mock -description: Help page for the PowerShell Pester 'Mock' command - Mocks the behavior of an existing command with an alternateimplementation. +description: Help for Pester command 'Mock'. Mocks the behavior of an existing command with an alternate implementation. keywords: - PowerShell - Pester diff --git a/docs/commands/New-Fixture.mdx b/docs/commands/New-Fixture.mdx index 88751338..af702794 100644 --- a/docs/commands/New-Fixture.mdx +++ b/docs/commands/New-Fixture.mdx @@ -1,7 +1,7 @@ --- id: New-Fixture title: New-Fixture -description: Help page for the PowerShell Pester 'New-Fixture' command - This function generates two scripts, one that defines a functionand another one that contains its tests. +description: Help for Pester command 'New-Fixture'. This function generates two scripts, one that defines a function and another one that contains its tests. keywords: - PowerShell - Pester diff --git a/docs/commands/New-MockObject.mdx b/docs/commands/New-MockObject.mdx index 24930c64..30aa709d 100644 --- a/docs/commands/New-MockObject.mdx +++ b/docs/commands/New-MockObject.mdx @@ -1,7 +1,7 @@ --- id: New-MockObject title: New-MockObject -description: Help page for the PowerShell Pester 'New-MockObject' command - This function instantiates a .NET object from a type. +description: Help for Pester command 'New-MockObject'. This function instantiates a .NET object from a type. keywords: - PowerShell - Pester diff --git a/docs/commands/New-PesterConfiguration.mdx b/docs/commands/New-PesterConfiguration.mdx index 7d9e6d8c..6cf8562e 100644 --- a/docs/commands/New-PesterConfiguration.mdx +++ b/docs/commands/New-PesterConfiguration.mdx @@ -1,7 +1,7 @@ --- id: New-PesterConfiguration title: New-PesterConfiguration -description: Help page for the PowerShell Pester 'New-PesterConfiguration' command - Creates a new PesterConfiguration object for advanced configuration of Invoke-Pester. +description: Help for Pester command 'New-PesterConfiguration'. Creates a new PesterConfiguration object for advanced configuration of Invoke-Pester. keywords: - PowerShell - Pester diff --git a/docs/commands/New-PesterContainer.mdx b/docs/commands/New-PesterContainer.mdx index cc3d75dd..67a4c93c 100644 --- a/docs/commands/New-PesterContainer.mdx +++ b/docs/commands/New-PesterContainer.mdx @@ -1,7 +1,7 @@ --- id: New-PesterContainer title: New-PesterContainer -description: Help page for the PowerShell Pester 'New-PesterContainer' command - Generates ContainerInfo-objects used as for Invoke-Pester -Container +description: Help for Pester command 'New-PesterContainer'. Generates ContainerInfo-objects used as for Invoke-Pester -Container keywords: - PowerShell - Pester diff --git a/docs/commands/Set-ItResult.mdx b/docs/commands/Set-ItResult.mdx index a1b0e18d..f5cdeed6 100644 --- a/docs/commands/Set-ItResult.mdx +++ b/docs/commands/Set-ItResult.mdx @@ -1,7 +1,7 @@ --- id: Set-ItResult title: Set-ItResult -description: Help page for the PowerShell Pester 'Set-ItResult' command - Set-ItResult is used inside the It block to explicitly set the test result +description: Help for Pester command 'Set-ItResult'. Set-ItResult is used inside the It block to explicitly set the test result keywords: - PowerShell - Pester diff --git a/docs/commands/Should-All.mdx b/docs/commands/Should-All.mdx index a8b6591a..b349f582 100644 --- a/docs/commands/Should-All.mdx +++ b/docs/commands/Should-All.mdx @@ -1,7 +1,7 @@ --- id: Should-All title: Should-All -description: Help page for the PowerShell Pester 'Should-All' command - Compares all items in a collection to a filter script. If the filter returns true, or does not throw for all the items in the collection, the assertion passes. +description: Help for Pester command 'Should-All'. Compares all items in a collection to a filter script. If the filter returns true, or does not throw for all the items in the collection, the assertion passes. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-Any.mdx b/docs/commands/Should-Any.mdx index f4898b0a..876323c5 100644 --- a/docs/commands/Should-Any.mdx +++ b/docs/commands/Should-Any.mdx @@ -1,7 +1,7 @@ --- id: Should-Any title: Should-Any -description: Help page for the PowerShell Pester 'Should-Any' command - Compares all items in a collection to a filter script. If the filter returns true, or does not throw for any of the items in the collection, the assertion passes. +description: Help for Pester command 'Should-Any'. Compares all items in a collection to a filter script. If the filter returns true, or does not throw for any of the items in the collection, the assertion passes. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-Be.mdx b/docs/commands/Should-Be.mdx index 4f2b0409..a8cbdf17 100644 --- a/docs/commands/Should-Be.mdx +++ b/docs/commands/Should-Be.mdx @@ -1,7 +1,7 @@ --- id: Should-Be title: Should-Be -description: Help page for the PowerShell Pester 'Should-Be' command - Compares the expected value to actual value, to see if they are equal. +description: Help for Pester command 'Should-Be'. Compares the expected value to actual value, to see if they are equal. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeAfter.mdx b/docs/commands/Should-BeAfter.mdx index 50c0dbbb..271ae26d 100644 --- a/docs/commands/Should-BeAfter.mdx +++ b/docs/commands/Should-BeAfter.mdx @@ -1,7 +1,7 @@ --- id: Should-BeAfter title: Should-BeAfter -description: Help page for the PowerShell Pester 'Should-BeAfter' command - Asserts that the provided [datetime] is after the expected [datetime]. +description: Help for Pester command 'Should-BeAfter'. Asserts that the provided [datetime] is after the expected [datetime]. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeBefore.mdx b/docs/commands/Should-BeBefore.mdx index 088c5267..b09849ca 100644 --- a/docs/commands/Should-BeBefore.mdx +++ b/docs/commands/Should-BeBefore.mdx @@ -1,7 +1,7 @@ --- id: Should-BeBefore title: Should-BeBefore -description: Help page for the PowerShell Pester 'Should-BeBefore' command - Asserts that the provided [datetime] is before the expected [datetime]. +description: Help for Pester command 'Should-BeBefore'. Asserts that the provided [datetime] is before the expected [datetime]. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeCollection.mdx b/docs/commands/Should-BeCollection.mdx index 61230a40..185d5dd0 100644 --- a/docs/commands/Should-BeCollection.mdx +++ b/docs/commands/Should-BeCollection.mdx @@ -1,7 +1,7 @@ --- id: Should-BeCollection title: Should-BeCollection -description: Help page for the PowerShell Pester 'Should-BeCollection' command - Compares collections for equality, by comparing their sizes and each item in them. It does not compare the types of the input collections. +description: Help for Pester command 'Should-BeCollection'. Compares collections for equality, by comparing their sizes and each item in them. It does not compare the types of the input collections. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeEmptyString.mdx b/docs/commands/Should-BeEmptyString.mdx index 76e4021c..1700d6f2 100644 --- a/docs/commands/Should-BeEmptyString.mdx +++ b/docs/commands/Should-BeEmptyString.mdx @@ -1,7 +1,7 @@ --- id: Should-BeEmptyString title: Should-BeEmptyString -description: Help page for the PowerShell Pester 'Should-BeEmptyString' command - Ensures that input is an empty string. +description: Help for Pester command 'Should-BeEmptyString'. Ensures that input is an empty string. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeEquivalent.mdx b/docs/commands/Should-BeEquivalent.mdx index d9b1c7dc..ebfcf5f8 100644 --- a/docs/commands/Should-BeEquivalent.mdx +++ b/docs/commands/Should-BeEquivalent.mdx @@ -1,7 +1,7 @@ --- id: Should-BeEquivalent title: Should-BeEquivalent -description: Help page for the PowerShell Pester 'Should-BeEquivalent' command - Compares two objects for equivalency, by recursively comparing their properties for equivalency. +description: Help for Pester command 'Should-BeEquivalent'. Compares two objects for equivalency, by recursively comparing their properties for equivalency. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeFalse.mdx b/docs/commands/Should-BeFalse.mdx index f86661ca..1aa59de8 100644 --- a/docs/commands/Should-BeFalse.mdx +++ b/docs/commands/Should-BeFalse.mdx @@ -1,7 +1,7 @@ --- id: Should-BeFalse title: Should-BeFalse -description: Help page for the PowerShell Pester 'Should-BeFalse' command - Compares the actual value to a boolean $false. It does not convert input values to boolean, and will fail for any value that is not $false. +description: Help for Pester command 'Should-BeFalse'. Compares the actual value to a boolean $false. It does not convert input values to boolean, and will fail for any value that is not $false. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeFalsy.mdx b/docs/commands/Should-BeFalsy.mdx index e0ddd78f..b75e5229 100644 --- a/docs/commands/Should-BeFalsy.mdx +++ b/docs/commands/Should-BeFalsy.mdx @@ -1,7 +1,7 @@ --- id: Should-BeFalsy title: Should-BeFalsy -description: "Help page for the PowerShell Pester 'Should-BeFalsy' command - Compares the actual value to a boolean $false or a falsy value: 0, \"\", $null or @(). It converts the input value to a boolean." +description: "Help for Pester command 'Should-BeFalsy'. Compares the actual value to a boolean $false or a falsy value: 0, \"\", $null or @(). It converts the input value to a boolean." keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeFasterThan.mdx b/docs/commands/Should-BeFasterThan.mdx index 6be9f839..d88fb34a 100644 --- a/docs/commands/Should-BeFasterThan.mdx +++ b/docs/commands/Should-BeFasterThan.mdx @@ -1,7 +1,7 @@ --- id: Should-BeFasterThan title: Should-BeFasterThan -description: Help page for the PowerShell Pester 'Should-BeFasterThan' command - Asserts that the provided [timespan] or [scriptblock] is faster than the expected [timespan]. +description: Help for Pester command 'Should-BeFasterThan'. Asserts that the provided [timespan] or [scriptblock] is faster than the expected [timespan]. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeGreaterThan.mdx b/docs/commands/Should-BeGreaterThan.mdx index c9df5221..933f91c8 100644 --- a/docs/commands/Should-BeGreaterThan.mdx +++ b/docs/commands/Should-BeGreaterThan.mdx @@ -1,7 +1,7 @@ --- id: Should-BeGreaterThan title: Should-BeGreaterThan -description: Help page for the PowerShell Pester 'Should-BeGreaterThan' command - Compares the expected value to actual value, to see if the actual value is greater than the expected value. +description: Help for Pester command 'Should-BeGreaterThan'. Compares the expected value to actual value, to see if the actual value is greater than the expected value. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeGreaterThanOrEqual.mdx b/docs/commands/Should-BeGreaterThanOrEqual.mdx index ae759ae2..3267f92e 100644 --- a/docs/commands/Should-BeGreaterThanOrEqual.mdx +++ b/docs/commands/Should-BeGreaterThanOrEqual.mdx @@ -1,7 +1,7 @@ --- id: Should-BeGreaterThanOrEqual title: Should-BeGreaterThanOrEqual -description: Help page for the PowerShell Pester 'Should-BeGreaterThanOrEqual' command - Compares the expected value to actual value, to see if the actual value is greater than or equal to the expected value. +description: Help for Pester command 'Should-BeGreaterThanOrEqual'. Compares the expected value to actual value, to see if the actual value is greater than or equal to the expected value. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeHashtable.mdx b/docs/commands/Should-BeHashtable.mdx index d92effad..91d9059b 100644 --- a/docs/commands/Should-BeHashtable.mdx +++ b/docs/commands/Should-BeHashtable.mdx @@ -1,7 +1,7 @@ --- id: Should-BeHashtable title: Should-BeHashtable -description: Help page for the PowerShell Pester 'Should-BeHashtable' command - Asserts that the input is a hashtable or dictionary, and optionally checks the number ofentries, whether it is ordered, and that it contains specific keys. +description: Help for Pester command 'Should-BeHashtable'. Asserts that the input is a hashtable or dictionary, and optionally checks the number of entries, whether it is ordered, and that it contains specific keys. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeLessThan.mdx b/docs/commands/Should-BeLessThan.mdx index 09cffa49..32db5452 100644 --- a/docs/commands/Should-BeLessThan.mdx +++ b/docs/commands/Should-BeLessThan.mdx @@ -1,7 +1,7 @@ --- id: Should-BeLessThan title: Should-BeLessThan -description: Help page for the PowerShell Pester 'Should-BeLessThan' command - Compares the expected value to actual value, to see if the actual value is less than the expected value. +description: Help for Pester command 'Should-BeLessThan'. Compares the expected value to actual value, to see if the actual value is less than the expected value. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeLessThanOrEqual.mdx b/docs/commands/Should-BeLessThanOrEqual.mdx index a33ea2b3..eac8902d 100644 --- a/docs/commands/Should-BeLessThanOrEqual.mdx +++ b/docs/commands/Should-BeLessThanOrEqual.mdx @@ -1,7 +1,7 @@ --- id: Should-BeLessThanOrEqual title: Should-BeLessThanOrEqual -description: Help page for the PowerShell Pester 'Should-BeLessThanOrEqual' command - Compares the expected value to actual value, to see if the actual value is less than or equal to the expected value. +description: Help for Pester command 'Should-BeLessThanOrEqual'. Compares the expected value to actual value, to see if the actual value is less than or equal to the expected value. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeLikeString.mdx b/docs/commands/Should-BeLikeString.mdx index c790e648..bb2f274e 100644 --- a/docs/commands/Should-BeLikeString.mdx +++ b/docs/commands/Should-BeLikeString.mdx @@ -1,7 +1,7 @@ --- id: Should-BeLikeString title: Should-BeLikeString -description: Help page for the PowerShell Pester 'Should-BeLikeString' command - Asserts that the actual value is like the expected value. +description: Help for Pester command 'Should-BeLikeString'. Asserts that the actual value is like the expected value. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeNull.mdx b/docs/commands/Should-BeNull.mdx index ee96e48c..558b16db 100644 --- a/docs/commands/Should-BeNull.mdx +++ b/docs/commands/Should-BeNull.mdx @@ -1,7 +1,7 @@ --- id: Should-BeNull title: Should-BeNull -description: Help page for the PowerShell Pester 'Should-BeNull' command - Asserts that the input is `$null`. +description: Help for Pester command 'Should-BeNull'. Asserts that the input is `$null`. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeSame.mdx b/docs/commands/Should-BeSame.mdx index 8339e952..c9d89cfb 100644 --- a/docs/commands/Should-BeSame.mdx +++ b/docs/commands/Should-BeSame.mdx @@ -1,7 +1,7 @@ --- id: Should-BeSame title: Should-BeSame -description: Help page for the PowerShell Pester 'Should-BeSame' command - Compares the expected value to actual value, to see if they are the same instance. +description: Help for Pester command 'Should-BeSame'. Compares the expected value to actual value, to see if they are the same instance. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeSlowerThan.mdx b/docs/commands/Should-BeSlowerThan.mdx index 4cc7b3bb..f7ff6686 100644 --- a/docs/commands/Should-BeSlowerThan.mdx +++ b/docs/commands/Should-BeSlowerThan.mdx @@ -1,7 +1,7 @@ --- id: Should-BeSlowerThan title: Should-BeSlowerThan -description: Help page for the PowerShell Pester 'Should-BeSlowerThan' command - Asserts that the provided [timespan] is slower than the expected [timespan]. +description: Help for Pester command 'Should-BeSlowerThan'. Asserts that the provided [timespan] is slower than the expected [timespan]. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeString.mdx b/docs/commands/Should-BeString.mdx index e49f2ce1..6fd24ab1 100644 --- a/docs/commands/Should-BeString.mdx +++ b/docs/commands/Should-BeString.mdx @@ -1,7 +1,7 @@ --- id: Should-BeString title: Should-BeString -description: Help page for the PowerShell Pester 'Should-BeString' command - Asserts that the actual value is equal to the expected value. +description: Help for Pester command 'Should-BeString'. Asserts that the actual value is equal to the expected value. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeTrue.mdx b/docs/commands/Should-BeTrue.mdx index 5abdec93..08ea8465 100644 --- a/docs/commands/Should-BeTrue.mdx +++ b/docs/commands/Should-BeTrue.mdx @@ -1,7 +1,7 @@ --- id: Should-BeTrue title: Should-BeTrue -description: Help page for the PowerShell Pester 'Should-BeTrue' command - Compares the actual value to a boolean $true. It does not convert input values to boolean, and will fail for any value is not $true. +description: Help for Pester command 'Should-BeTrue'. Compares the actual value to a boolean $true. It does not convert input values to boolean, and will fail for any value is not $true. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-BeTruthy.mdx b/docs/commands/Should-BeTruthy.mdx index 4e4c5f47..42c00b85 100644 --- a/docs/commands/Should-BeTruthy.mdx +++ b/docs/commands/Should-BeTruthy.mdx @@ -1,7 +1,7 @@ --- id: Should-BeTruthy title: Should-BeTruthy -description: Help page for the PowerShell Pester 'Should-BeTruthy' command - Compares the actual value to a boolean $true. It converts input values to boolean, and will fail for any value is not $true, or truthy. +description: Help for Pester command 'Should-BeTruthy'. Compares the actual value to a boolean $true. It converts input values to boolean, and will fail for any value is not $true, or truthy. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-ContainCollection.mdx b/docs/commands/Should-ContainCollection.mdx index 1a6402fc..760fb904 100644 --- a/docs/commands/Should-ContainCollection.mdx +++ b/docs/commands/Should-ContainCollection.mdx @@ -1,7 +1,7 @@ --- id: Should-ContainCollection title: Should-ContainCollection -description: Help page for the PowerShell Pester 'Should-ContainCollection' command - Checks that the expected collection is present in the actual collection as an ordered subsequence. It does not compare the types of the input collections. +description: Help for Pester command 'Should-ContainCollection'. Checks that the expected collection is present in the actual collection as an ordered subsequence. It does not compare the types of the input collections. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-HaveParameter.mdx b/docs/commands/Should-HaveParameter.mdx index effaaa9b..9ab5eb9b 100644 --- a/docs/commands/Should-HaveParameter.mdx +++ b/docs/commands/Should-HaveParameter.mdx @@ -1,7 +1,7 @@ --- id: Should-HaveParameter title: Should-HaveParameter -description: Help page for the PowerShell Pester 'Should-HaveParameter' command - Asserts that a command has the expected parameter. +description: Help for Pester command 'Should-HaveParameter'. Asserts that a command has the expected parameter. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-HaveType.mdx b/docs/commands/Should-HaveType.mdx index 678fbb63..b93a043b 100644 --- a/docs/commands/Should-HaveType.mdx +++ b/docs/commands/Should-HaveType.mdx @@ -1,7 +1,7 @@ --- id: Should-HaveType title: Should-HaveType -description: Help page for the PowerShell Pester 'Should-HaveType' command - Asserts that the input is of the expected type. +description: Help for Pester command 'Should-HaveType'. Asserts that the input is of the expected type. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-Invoke.mdx b/docs/commands/Should-Invoke.mdx index 5b3a77f0..c2a7a15b 100644 --- a/docs/commands/Should-Invoke.mdx +++ b/docs/commands/Should-Invoke.mdx @@ -1,7 +1,7 @@ --- id: Should-Invoke title: Should-Invoke -description: Help page for the PowerShell Pester 'Should-Invoke' command - Checks if a Mocked command has been called a certain number of timesand throws an exception if it has not. +description: Help for Pester command 'Should-Invoke'. Checks if a Mocked command has been called a certain number of times and throws an exception if it has not. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-MatchString.mdx b/docs/commands/Should-MatchString.mdx index 956675f2..f9f7117b 100644 --- a/docs/commands/Should-MatchString.mdx +++ b/docs/commands/Should-MatchString.mdx @@ -1,7 +1,7 @@ --- id: Should-MatchString title: Should-MatchString -description: Help page for the PowerShell Pester 'Should-MatchString' command - Tests whether a string matches a regular expression pattern. +description: Help for Pester command 'Should-MatchString'. Tests whether a string matches a regular expression pattern. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-NotBe.mdx b/docs/commands/Should-NotBe.mdx index 7965dffd..09b44956 100644 --- a/docs/commands/Should-NotBe.mdx +++ b/docs/commands/Should-NotBe.mdx @@ -1,7 +1,7 @@ --- id: Should-NotBe title: Should-NotBe -description: Help page for the PowerShell Pester 'Should-NotBe' command - Compares the expected value to actual value, to see if they are not equal. +description: Help for Pester command 'Should-NotBe'. Compares the expected value to actual value, to see if they are not equal. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-NotBeEmptyString.mdx b/docs/commands/Should-NotBeEmptyString.mdx index 82b8538e..4460c305 100644 --- a/docs/commands/Should-NotBeEmptyString.mdx +++ b/docs/commands/Should-NotBeEmptyString.mdx @@ -1,7 +1,7 @@ --- id: Should-NotBeEmptyString title: Should-NotBeEmptyString -description: Help page for the PowerShell Pester 'Should-NotBeEmptyString' command - Ensures that the input is a string, and that the input is not $null or empty string. +description: Help for Pester command 'Should-NotBeEmptyString'. Ensures that the input is a string, and that the input is not $null or empty string. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-NotBeLikeString.mdx b/docs/commands/Should-NotBeLikeString.mdx index fc9a7d30..baf2c1fb 100644 --- a/docs/commands/Should-NotBeLikeString.mdx +++ b/docs/commands/Should-NotBeLikeString.mdx @@ -1,7 +1,7 @@ --- id: Should-NotBeLikeString title: Should-NotBeLikeString -description: Help page for the PowerShell Pester 'Should-NotBeLikeString' command - Asserts that the actual value is not like the expected value. +description: Help for Pester command 'Should-NotBeLikeString'. Asserts that the actual value is not like the expected value. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-NotBeNull.mdx b/docs/commands/Should-NotBeNull.mdx index a94cc8c2..cb4c7af1 100644 --- a/docs/commands/Should-NotBeNull.mdx +++ b/docs/commands/Should-NotBeNull.mdx @@ -1,7 +1,7 @@ --- id: Should-NotBeNull title: Should-NotBeNull -description: Help page for the PowerShell Pester 'Should-NotBeNull' command - Asserts that the input is not `$null`. +description: Help for Pester command 'Should-NotBeNull'. Asserts that the input is not `$null`. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-NotBeSame.mdx b/docs/commands/Should-NotBeSame.mdx index 44402df3..466dda13 100644 --- a/docs/commands/Should-NotBeSame.mdx +++ b/docs/commands/Should-NotBeSame.mdx @@ -1,7 +1,7 @@ --- id: Should-NotBeSame title: Should-NotBeSame -description: Help page for the PowerShell Pester 'Should-NotBeSame' command - Compares the expected value to actual value, to see if the actual value is not the same instance as the expected value. +description: Help for Pester command 'Should-NotBeSame'. Compares the expected value to actual value, to see if the actual value is not the same instance as the expected value. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-NotBeString.mdx b/docs/commands/Should-NotBeString.mdx index 14e3b7b0..bd1259f5 100644 --- a/docs/commands/Should-NotBeString.mdx +++ b/docs/commands/Should-NotBeString.mdx @@ -1,7 +1,7 @@ --- id: Should-NotBeString title: Should-NotBeString -description: Help page for the PowerShell Pester 'Should-NotBeString' command - Asserts that the actual value is not equal to the expected value. +description: Help for Pester command 'Should-NotBeString'. Asserts that the actual value is not equal to the expected value. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-NotBeWhiteSpaceString.mdx b/docs/commands/Should-NotBeWhiteSpaceString.mdx index 43a7bdd5..14790aeb 100644 --- a/docs/commands/Should-NotBeWhiteSpaceString.mdx +++ b/docs/commands/Should-NotBeWhiteSpaceString.mdx @@ -1,7 +1,7 @@ --- id: Should-NotBeWhiteSpaceString title: Should-NotBeWhiteSpaceString -description: Help page for the PowerShell Pester 'Should-NotBeWhiteSpaceString' command - Ensures that the input is a string, and that the input is not $null, empty, or whitespace only string. +description: Help for Pester command 'Should-NotBeWhiteSpaceString'. Ensures that the input is a string, and that the input is not $null, empty, or whitespace only string. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-NotContainCollection.mdx b/docs/commands/Should-NotContainCollection.mdx index d14ff603..8784fde9 100644 --- a/docs/commands/Should-NotContainCollection.mdx +++ b/docs/commands/Should-NotContainCollection.mdx @@ -1,7 +1,7 @@ --- id: Should-NotContainCollection title: Should-NotContainCollection -description: Help page for the PowerShell Pester 'Should-NotContainCollection' command - Checks that the expected collection is not present in the actual collection as an ordered subsequence. It does not compare the types of the input collections. +description: Help for Pester command 'Should-NotContainCollection'. Checks that the expected collection is not present in the actual collection as an ordered subsequence. It does not compare the types of the input collections. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-NotHaveParameter.mdx b/docs/commands/Should-NotHaveParameter.mdx index 44c39be5..b0a118de 100644 --- a/docs/commands/Should-NotHaveParameter.mdx +++ b/docs/commands/Should-NotHaveParameter.mdx @@ -1,7 +1,7 @@ --- id: Should-NotHaveParameter title: Should-NotHaveParameter -description: Help page for the PowerShell Pester 'Should-NotHaveParameter' command - Asserts that a command has does not have the parameter. +description: Help for Pester command 'Should-NotHaveParameter'. Asserts that a command has does not have the parameter. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-NotHaveType.mdx b/docs/commands/Should-NotHaveType.mdx index abf4456a..6ae4e71c 100644 --- a/docs/commands/Should-NotHaveType.mdx +++ b/docs/commands/Should-NotHaveType.mdx @@ -1,7 +1,7 @@ --- id: Should-NotHaveType title: Should-NotHaveType -description: Help page for the PowerShell Pester 'Should-NotHaveType' command - Asserts that the input is not of the expected type. +description: Help for Pester command 'Should-NotHaveType'. Asserts that the input is not of the expected type. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-NotInvoke.mdx b/docs/commands/Should-NotInvoke.mdx index 69c5aaa5..57713cef 100644 --- a/docs/commands/Should-NotInvoke.mdx +++ b/docs/commands/Should-NotInvoke.mdx @@ -1,7 +1,7 @@ --- id: Should-NotInvoke title: Should-NotInvoke -description: Help page for the PowerShell Pester 'Should-NotInvoke' command - Checks that mocked command was not called and throws exception if it was. +description: Help for Pester command 'Should-NotInvoke'. Checks that mocked command was not called and throws exception if it was. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-NotMatchString.mdx b/docs/commands/Should-NotMatchString.mdx index 1ea2e3dc..5550cb68 100644 --- a/docs/commands/Should-NotMatchString.mdx +++ b/docs/commands/Should-NotMatchString.mdx @@ -1,7 +1,7 @@ --- id: Should-NotMatchString title: Should-NotMatchString -description: Help page for the PowerShell Pester 'Should-NotMatchString' command - Tests whether a string does not match a regular expression pattern. +description: Help for Pester command 'Should-NotMatchString'. Tests whether a string does not match a regular expression pattern. keywords: - PowerShell - Pester diff --git a/docs/commands/Should-Throw.mdx b/docs/commands/Should-Throw.mdx index df1b7471..ca117e51 100644 --- a/docs/commands/Should-Throw.mdx +++ b/docs/commands/Should-Throw.mdx @@ -1,7 +1,7 @@ --- id: Should-Throw title: Should-Throw -description: Help page for the PowerShell Pester 'Should-Throw' command - Asserts that a script block throws an exception. +description: Help for Pester command 'Should-Throw'. Asserts that a script block throws an exception. keywords: - PowerShell - Pester diff --git a/docs/commands/Should.mdx b/docs/commands/Should.mdx index d4860c1f..57ae88aa 100644 --- a/docs/commands/Should.mdx +++ b/docs/commands/Should.mdx @@ -1,7 +1,7 @@ --- id: Should title: Should -description: Help page for the PowerShell Pester 'Should' command - Should is a keyword that is used to define an assertion inside an It block. +description: Help for Pester command 'Should'. Should is a keyword that is used to define an assertion inside an It block. keywords: - PowerShell - Pester diff --git a/docs/commands/docusaurus.sidebar.js b/docs/commands/docusaurus.sidebar.js index 58ff74d4..a8d1ee18 100644 --- a/docs/commands/docusaurus.sidebar.js +++ b/docs/commands/docusaurus.sidebar.js @@ -1,7 +1,7 @@ /** * Import this file in your Docusaurus `sidebars.js` file. * - * Auto-generated by Alt3.Docusaurus.Powershell 1.0.37. + * Auto-generated by Alt3.Docusaurus.Powershell 2.0.0. * * Copyright (c) 2019-present, ALT3 B.V. * diff --git a/generate-command-reference.ps1 b/generate-command-reference.ps1 index 9446f773..45160805 100644 --- a/generate-command-reference.ps1 +++ b/generate-command-reference.ps1 @@ -8,8 +8,17 @@ .EXAMPLE .\generate-command-reference.ps1 + Update current (latest) docs using latest Pester version + + .EXAMPLE + .\generate-command-reference.ps1 -PesterVersion 6.0.0 + + Update current (latest) docs using Pester 6.0.0 explicitly + .EXAMPLE - .\generate-command-reference.ps1 -PesterVersion 4.10.1 + .\generate-command-reference.ps1 -PesterVersion 5.9.0 -DocsVersion v5 + + Update versioned docs for v5 using explicit version 5.9.0 .LINK https://docusaurus-powershell.netlify.app/docs/faq/ci-cd @@ -23,10 +32,10 @@ param ( [ValidateSet('Current','v4','v5')] [string] $DocsVersion = 'Current' ) -# Set-StrictMode -Version Latest -# $PSDefaultParameterValues['*:ErrorAction'] = 'Stop' +Set-StrictMode -Version Latest +$PSDefaultParameterValues['*:ErrorAction'] = 'Stop' -Write-Host 'Generating MDX files for website Command Reference' -BackgroundColor DarkGreen +Write-Host 'Generating MDX files for Command Reference-section of website' -BackgroundColor DarkGreen # ----------------------------------------------------------------------------- # Install required modules @@ -68,10 +77,23 @@ $ModuleList.Keys.Clone() | ForEach-Object { } } +Write-Host 'Pre-processing CommandHelp-objects' -ForegroundColor Magenta +$commandHelp = & { + # Workaround: Strict mode breaks PlatyPS (https://github.com/PowerShell/platyPS/issues/800) + Set-StrictMode -Off + New-CommandHelp -CommandInfo (Get-Command -Module Pester -CommandType Cmdlet, Function) +} +$commandHelp | ForEach-Object { + # Customize the description metadata for each command to include the synopsis + # Synopsis is guaranteed by Help.Tests.ps1 in pester/pester-repo, so not checking for "Fill in ..." placeholders + $_.Metadata['description'] = "Help for Pester command '$($_.Title)'. $($_.Synopsis -replace '\s+', ' ')" +} + # ----------------------------------------------------------------------------- # Use below settings to manipulate the rendered MDX files # ----------------------------------------------------------------------------- $docusaurusOptions = @{ + CommandHelp = $commandHelp DocsFolder = switch ($DocsVersion) { 'Current' { "$PSScriptRoot/docs" } 'v5' { "$PSScriptRoot/versioned_docs/version-v5" } @@ -115,11 +137,7 @@ if (Test-Path -Path $outputFolder) { } Write-Host 'Generating new MDX files' -ForegroundColor Magenta -$commandHelp = New-CommandHelp -CommandInfo (Get-Command -Module Pester -CommandType Cmdlet, Function) -$commandHelp | ForEach-Object { - $_.Metadata['description'] = "Help page for the PowerShell Pester '$($_.Title)' command - $($_.Synopsis.ReplaceLineEndings(''))" -} -New-DocusaurusHelp @docusaurusOptions -CommandHelp $commandHelp +New-DocusaurusHelp @docusaurusOptions function Repair-ExampleFences { <# @@ -195,7 +213,7 @@ function Repair-ExampleFences { # contain their own Markdown fences (see Repair-ExampleFences) so the MDX # compiles. # ----------------------------------------------------------------------------- -Write-Host 'Post-processing generated MDX files (ProgressAction, example fences)' -ForegroundColor Magenta +Write-Host 'Post-processing generated MDX files' -ForegroundColor Magenta $commandsFolder = Join-Path -Path $docusaurusOptions.DocsFolder -ChildPath $docusaurusOptions.Sidebar Get-ChildItem -Path $commandsFolder -Filter '*.mdx' | ForEach-Object { $content = Get-Content -LiteralPath $_.FullName -Raw From 6a39f2ba421d6c2c9e0f25dfd320702560b6cae1 Mon Sep 17 00:00:00 2001 From: Frode Flaten <3436158+fflaten@users.noreply.github.com> Date: Fri, 17 Jul 2026 14:27:50 +0000 Subject: [PATCH 06/17] Remove template logo --- static/img/logo.svg | 1 - static/img/undraw_docusaurus_mountain.svg | 170 ---------------------- static/img/undraw_docusaurus_react.svg | 169 --------------------- static/img/undraw_docusaurus_tree.svg | 1 - 4 files changed, 341 deletions(-) delete mode 100644 static/img/logo.svg delete mode 100644 static/img/undraw_docusaurus_mountain.svg delete mode 100644 static/img/undraw_docusaurus_react.svg delete mode 100644 static/img/undraw_docusaurus_tree.svg diff --git a/static/img/logo.svg b/static/img/logo.svg deleted file mode 100644 index 9db6d0d0..00000000 --- a/static/img/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/static/img/undraw_docusaurus_mountain.svg b/static/img/undraw_docusaurus_mountain.svg deleted file mode 100644 index 431cef2f..00000000 --- a/static/img/undraw_docusaurus_mountain.svg +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/static/img/undraw_docusaurus_react.svg b/static/img/undraw_docusaurus_react.svg deleted file mode 100644 index e4170504..00000000 --- a/static/img/undraw_docusaurus_react.svg +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/static/img/undraw_docusaurus_tree.svg b/static/img/undraw_docusaurus_tree.svg deleted file mode 100644 index a05cc03d..00000000 --- a/static/img/undraw_docusaurus_tree.svg +++ /dev/null @@ -1 +0,0 @@ -docu_tree \ No newline at end of file From 3d512ba2a95b9e520b64aa9fd5bd942403984cb3 Mon Sep 17 00:00:00 2001 From: fflaten <3436158+fflaten@users.noreply.github.com> Date: Sun, 26 Jul 2026 23:09:07 +0000 Subject: [PATCH 07/17] Update generated docs to 5.9.0 --- .../commands/Add-ShouldOperator.mdx | 156 +- .../version-v5/commands/AfterAll.mdx | 39 +- .../version-v5/commands/AfterEach.mdx | 39 +- .../version-v5/commands/Assert-MockCalled.mdx | 206 +- .../commands/Assert-VerifiableMock.mdx | 18 +- .../version-v5/commands/BeforeAll.mdx | 39 +- .../version-v5/commands/BeforeDiscovery.mdx | 39 +- .../version-v5/commands/BeforeEach.mdx | 39 +- .../version-v5/commands/Context.mdx | 173 +- .../commands/ConvertTo-JUnitReport.mdx | 76 +- .../commands/ConvertTo-NUnitReport.mdx | 103 +- .../commands/ConvertTo-Pester4Result.mdx | 41 +- .../version-v5/commands/Describe.mdx | 187 +- .../commands/Export-JUnitReport.mdx | 76 +- .../commands/Export-NUnitReport.mdx | 99 +- .../commands/Get-ShouldOperator.mdx | 39 +- .../version-v5/commands/InModuleScope.mdx | 125 +- .../version-v5/commands/Invoke-Pester.mdx | 758 ++++--- versioned_docs/version-v5/commands/It.mdx | 211 +- versioned_docs/version-v5/commands/Mock.mdx | 209 +- .../version-v5/commands/New-Fixture.mdx | 71 +- .../version-v5/commands/New-MockObject.mdx | 179 +- .../commands/New-PesterConfiguration.mdx | 42 +- .../commands/New-PesterContainer.mdx | 106 +- .../version-v5/commands/Set-ItResult.mdx | 127 +- versioned_docs/version-v5/commands/Should.mdx | 1827 +++++++++++------ .../version-v5/commands/docusaurus.sidebar.js | 2 +- .../version-v5/usage/configuration.mdx | 2 +- 28 files changed, 3092 insertions(+), 1936 deletions(-) diff --git a/versioned_docs/version-v5/commands/Add-ShouldOperator.mdx b/versioned_docs/version-v5/commands/Add-ShouldOperator.mdx index cc931bc6..a843da68 100644 --- a/versioned_docs/version-v5/commands/Add-ShouldOperator.mdx +++ b/versioned_docs/version-v5/commands/Add-ShouldOperator.mdx @@ -1,7 +1,7 @@ --- id: Add-ShouldOperator title: Add-ShouldOperator -description: Help page for the PowerShell Pester "Add-ShouldOperator" command +description: Help for Pester command 'Add-ShouldOperator'. Register a Should Operator with Pester keywords: - PowerShell - Pester @@ -23,8 +23,8 @@ Register a Should Operator with Pester ## SYNTAX ```powershell -Add-ShouldOperator [-Name] [-Test] [[-Alias] ] [[-InternalName] ] - [-SupportsArrayInput] [] +Add-ShouldOperator [-Name] [-Test] [[-Alias] ] + [[-InternalName] ] [-SupportsArrayInput] ``` ## DESCRIPTION @@ -67,92 +67,120 @@ Example of how to create a simple custom assertion that checks if the input stri ## PARAMETERS -### -Name +### -Alias -The name of the assertion. -This will become a Named Parameter of Should. +A list of aliases for the Named Parameter. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Test +### -InternalName -The test function. -The function must return a PSObject with a [Bool]succeeded and a [string]failureMessage property. +If -Name is different from the actual function name, record the actual function name here. +Used by Get-ShouldOperator to pull function help. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Alias +### -Name -A list of aliases for the Named Parameter. +The name of the assertion. +This will become a Named Parameter of Should. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -InternalName +### -SupportsArrayInput -If -Name is different from the actual function name, record the actual function name here. -Used by Get-ShouldOperator to pull function help. +Does the test function support the passing an array of values to test. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -SupportsArrayInput +### -Test -Does the test function support the passing an array of values to test. +The test function. +The function must return a PSObject with a [Bool]succeeded and a [string]failureMessage property. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -162,8 +190,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/Add-ShouldOperator](https://pester.dev/docs/v5/commands/Add-ShouldOperator) +- [https://pester.dev/docs/v5/commands/Add-ShouldOperator](https://pester.dev/docs/v5/commands/Add-ShouldOperator) ## 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.0](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..9ff34ad1 100644 --- a/versioned_docs/version-v5/commands/AfterAll.mdx +++ b/versioned_docs/version-v5/commands/AfterAll.mdx @@ -1,7 +1,7 @@ --- id: AfterAll title: AfterAll -description: Help page for the PowerShell Pester "AfterAll" command +description: Help for Pester command 'AfterAll'. Defines a series of steps to perform at the end of the current container, Context or Describe block. keywords: - PowerShell - Pester @@ -24,7 +24,7 @@ Context or Describe block. ## SYNTAX ```powershell -AfterAll [-Scriptblock] [] +AfterAll [-Scriptblock] ``` ## DESCRIPTION @@ -78,20 +78,28 @@ the tests in the Describe-block. A scriptblock with steps to be executed during teardown. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -101,10 +109,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/AfterAll](https://pester.dev/docs/v5/commands/AfterAll) - -[https://pester.dev/docs/v5/usage/setup-and-teardown](https://pester.dev/docs/v5/usage/setup-and-teardown) +- [https://pester.dev/docs/v5/commands/AfterAll](https://pester.dev/docs/v5/commands/AfterAll) +- [https://pester.dev/docs/v5/usage/setup-and-teardown](https://pester.dev/docs/v5/usage/setup-and-teardown) ## 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.0](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..74ae869c 100644 --- a/versioned_docs/version-v5/commands/AfterEach.mdx +++ b/versioned_docs/version-v5/commands/AfterEach.mdx @@ -1,7 +1,7 @@ --- id: AfterEach title: AfterEach -description: Help page for the PowerShell Pester "AfterEach" command +description: Help for Pester command 'AfterEach'. Defines a series of steps to perform at the end of every It block within the current Context or Describe block. keywords: - PowerShell - Pester @@ -24,7 +24,7 @@ the current Context or Describe block. ## SYNTAX ```powershell -AfterEach [-Scriptblock] [] +AfterEach [-Scriptblock] ``` ## DESCRIPTION @@ -75,20 +75,28 @@ The example uses AfterEach to remove a temporary file after each test. A scriptblock with steps to be executed during teardown. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -98,10 +106,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/AfterEach](https://pester.dev/docs/v5/commands/AfterEach) - -[https://pester.dev/docs/v5/usage/setup-and-teardown](https://pester.dev/docs/v5/usage/setup-and-teardown) +- [https://pester.dev/docs/v5/commands/AfterEach](https://pester.dev/docs/v5/commands/AfterEach) +- [https://pester.dev/docs/v5/usage/setup-and-teardown](https://pester.dev/docs/v5/usage/setup-and-teardown) ## 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.0](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..461f85f5 100644 --- a/versioned_docs/version-v5/commands/Assert-MockCalled.mdx +++ b/versioned_docs/version-v5/commands/Assert-MockCalled.mdx @@ -1,7 +1,7 @@ --- id: Assert-MockCalled title: Assert-MockCalled -description: Help page for the PowerShell Pester "Assert-MockCalled" command +description: Help for Pester command 'Assert-MockCalled'. {{ Fill in the Synopsis }} keywords: - PowerShell - Pester @@ -18,26 +18,22 @@ Contributions are welcome in [Pester-repo](https://github.com/pester/pester). ## SYNOPSIS -Checks if a Mocked command has been called a certain number of times -and throws an exception if it has not. - -THIS COMMAND IS OBSOLETE AND WILL BE REMOVED SOMEWHERE DURING v5 LIFETIME, -USE Should -Invoke INSTEAD. +\{\{ Fill in the Synopsis \}\} ## SYNTAX ### ParameterFilter (Default) ```powershell -Assert-MockCalled [-CommandName] [[-Times] ] [-ParameterFilter ] - [-ModuleName ] [-Scope ] [-Exactly] [] +Assert-MockCalled [-CommandName] [[-Times] ] [-ParameterFilter ] + [-ModuleName ] [-Scope ] [-Exactly] ``` ### ExclusiveFilter ```powershell -Assert-MockCalled [-CommandName] [[-Times] ] [-ParameterFilter ] - -ExclusiveFilter [-ModuleName ] [-Scope ] [-Exactly] [] +Assert-MockCalled [-CommandName] [[-Times] ] -ExclusiveFilter + [-ParameterFilter ] [-ModuleName ] [-Scope ] [-Exactly] ``` ## DESCRIPTION @@ -61,79 +57,104 @@ PS C:\> {{ Add example code here }} \{\{ Fill CommandName Description \}\} ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Times +### -Exactly -\{\{ Fill Times Description \}\} +\{\{ Fill Exactly Description \}\} ```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: 1 -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ParameterFilter +### -ExclusiveFilter -\{\{ Fill ParameterFilter Description \}\} +\{\{ Fill ExclusiveFilter Description \}\} ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: { $True } -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: ExclusiveFilter + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ExclusiveFilter +### -ModuleName -\{\{ Fill ExclusiveFilter Description \}\} +\{\{ Fill ModuleName Description \}\} ```yaml -Type: ScriptBlock -Parameter Sets: ExclusiveFilter -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ModuleName +### -ParameterFilter -\{\{ Fill ModuleName Description \}\} +\{\{ Fill ParameterFilter Description \}\} ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '{ $True }' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Scope @@ -141,36 +162,49 @@ Accept wildcard characters: False \{\{ Fill Scope Description \}\} ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: 0 -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: 0 +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Exactly +### -Times -\{\{ Fill Exactly Description \}\} +\{\{ Fill Times Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Int32 +DefaultValue: 1 +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -180,8 +214,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/Assert-MockCalled](https://pester.dev/docs/v5/commands/Assert-MockCalled) +- [https://pester.dev/docs/v5/commands/Assert-MockCalled](https://pester.dev/docs/v5/commands/Assert-MockCalled) ## 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.0](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..ffefe7e9 100644 --- a/versioned_docs/version-v5/commands/Assert-VerifiableMock.mdx +++ b/versioned_docs/version-v5/commands/Assert-VerifiableMock.mdx @@ -1,7 +1,7 @@ --- id: Assert-VerifiableMock title: Assert-VerifiableMock -description: Help page for the PowerShell Pester "Assert-VerifiableMock" command +description: Help for Pester command 'Assert-VerifiableMock'. {{ Fill in the Synopsis }} keywords: - PowerShell - Pester @@ -18,15 +18,12 @@ Contributions are welcome in [Pester-repo](https://github.com/pester/pester). ## SYNOPSIS -Checks if all verifiable Mocks has been called at least once. - -THIS COMMAND IS OBSOLETE AND WILL BE REMOVED SOMEWHERE DURING v5 LIFETIME, -USE Should -InvokeVerifiable INSTEAD. +\{\{ Fill in the Synopsis \}\} ## SYNTAX ```powershell -Assert-VerifiableMock [] +Assert-VerifiableMock ``` ## DESCRIPTION @@ -47,7 +44,10 @@ PS C:\> {{ Add example code here }} ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -57,8 +57,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/Assert-VerifiableMock](https://pester.dev/docs/v5/commands/Assert-VerifiableMock) +- [https://pester.dev/docs/v5/commands/Assert-VerifiableMock](https://pester.dev/docs/v5/commands/Assert-VerifiableMock) ## 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.0](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..2695957a 100644 --- a/versioned_docs/version-v5/commands/BeforeAll.mdx +++ b/versioned_docs/version-v5/commands/BeforeAll.mdx @@ -1,7 +1,7 @@ --- id: BeforeAll title: BeforeAll -description: Help page for the PowerShell Pester "BeforeAll" command +description: Help for Pester command 'BeforeAll'. Defines a series of steps to perform at the beginning of the current container, Context or Describe block. keywords: - PowerShell - Pester @@ -24,7 +24,7 @@ Context or Describe block. ## SYNTAX ```powershell -BeforeAll [-Scriptblock] [] +BeforeAll [-Scriptblock] ``` ## DESCRIPTION @@ -87,20 +87,28 @@ the results in separate tests. A scriptblock with steps to be executed during setup. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -110,10 +118,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/BeforeAll](https://pester.dev/docs/v5/commands/BeforeAll) - -[https://pester.dev/docs/v5/usage/setup-and-teardown](https://pester.dev/docs/v5/usage/setup-and-teardown) +- [https://pester.dev/docs/v5/commands/BeforeAll](https://pester.dev/docs/v5/commands/BeforeAll) +- [https://pester.dev/docs/v5/usage/setup-and-teardown](https://pester.dev/docs/v5/usage/setup-and-teardown) ## 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.0](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..8b2e2bec 100644 --- a/versioned_docs/version-v5/commands/BeforeDiscovery.mdx +++ b/versioned_docs/version-v5/commands/BeforeDiscovery.mdx @@ -1,7 +1,7 @@ --- id: BeforeDiscovery title: BeforeDiscovery -description: Help page for the PowerShell Pester "BeforeDiscovery" command +description: Help for Pester command 'BeforeDiscovery'. Runs setup code that is used during Discovery phase. keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Runs setup code that is used during Discovery phase. ## SYNTAX ```powershell -BeforeDiscovery [-ScriptBlock] [] +BeforeDiscovery [-ScriptBlock] ``` ## DESCRIPTION @@ -65,20 +65,28 @@ dynamically create a Describe-block and tests for each file found. The ScriptBlock to run. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -88,10 +96,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/BeforeDiscovery](https://pester.dev/docs/v5/commands/BeforeDiscovery) - -[https://pester.dev/docs/v5/usage/data-driven-tests](https://pester.dev/docs/v5/usage/data-driven-tests) +- [https://pester.dev/docs/v5/commands/BeforeDiscovery](https://pester.dev/docs/v5/commands/BeforeDiscovery) +- [https://pester.dev/docs/v5/usage/data-driven-tests](https://pester.dev/docs/v5/usage/data-driven-tests) ## 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.0](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..1f8c153a 100644 --- a/versioned_docs/version-v5/commands/BeforeEach.mdx +++ b/versioned_docs/version-v5/commands/BeforeEach.mdx @@ -1,7 +1,7 @@ --- id: BeforeEach title: BeforeEach -description: Help page for the PowerShell Pester "BeforeEach" command +description: Help for Pester command 'BeforeEach'. Defines a series of steps to perform at the beginning of every It block within the current Context or Describe block. keywords: - PowerShell - Pester @@ -24,7 +24,7 @@ the current Context or Describe block. ## SYNTAX ```powershell -BeforeEach [-Scriptblock] [] +BeforeEach [-Scriptblock] ``` ## DESCRIPTION @@ -72,20 +72,28 @@ The example uses BeforeEach to ensure a clean sample-file is used for each test. A scriptblock with steps to be executed during setup. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -95,10 +103,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/BeforeEach](https://pester.dev/docs/v5/commands/BeforeEach) - -[https://pester.dev/docs/v5/usage/setup-and-teardown](https://pester.dev/docs/v5/usage/setup-and-teardown) +- [https://pester.dev/docs/v5/commands/BeforeEach](https://pester.dev/docs/v5/commands/BeforeEach) +- [https://pester.dev/docs/v5/usage/setup-and-teardown](https://pester.dev/docs/v5/usage/setup-and-teardown) ## 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.0](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..db74affd 100644 --- a/versioned_docs/version-v5/commands/Context.mdx +++ b/versioned_docs/version-v5/commands/Context.mdx @@ -1,7 +1,7 @@ --- id: Context title: Context -description: Help page for the PowerShell Pester "Context" command +description: Help for Pester command 'Context'. Provides logical grouping of It blocks within a single Describe block. keywords: - PowerShell - Pester @@ -23,8 +23,7 @@ Provides logical grouping of It blocks within a single Describe block. ## SYNTAX ```powershell -Context [-Name] [-Tag ] [[-Fixture] ] [-Skip] [-ForEach ] - [] +Context [-Name] [[-Fixture] ] [-Tag ] [-Skip] [-ForEach ] ``` ## DESCRIPTION @@ -69,58 +68,74 @@ Example of how to use Context for grouping different tests ## PARAMETERS -### -Name +### -Fixture -The name of the Context. -This is a phrase describing a set of tests within a describe. +Script that is executed. +This may include setup specific to the context +and one or more It blocks that validate the expected outcomes. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Tag +### -ForEach -Optional parameter containing an array of strings. -When calling Invoke-Pester, -it is possible to specify a -Tag parameter which will only execute Context blocks -containing the same Tag. +Allows data driven tests to be written. +Takes an array of data and generates one block for each item in the array, and makes the item +available as $_ in all child blocks. +When the array is an array of hashtables, it additionally +defines each key in the hashtable as variable. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: Tags - -Required: False -Position: Named -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Fixture +### -Name -Script that is executed. -This may include setup specific to the context -and one or more It blocks that validate the expected outcomes. +The name of the Context. +This is a phrase describing a set of tests within a describe. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Skip @@ -130,40 +145,53 @@ This is preferable to temporarily commenting out a block, because it remains listed in the output. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ForEach +### -Tag -Allows data driven tests to be written. -Takes an array of data and generates one block for each item in the array, and makes the item -available as $_ in all child blocks. -When the array is an array of hashtables, it additionally -defines each key in the hashtable as variable. +Optional parameter containing an array of strings. +When calling Invoke-Pester, +it is possible to specify a -Tag parameter which will only execute Context blocks +containing the same Tag. ```yaml -Type: Object -Parameter Sets: (All) +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +- Tags +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -173,14 +201,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/Context](https://pester.dev/docs/v5/commands/Context) - -[https://pester.dev/docs/v5/usage/test-file-structure](https://pester.dev/docs/v5/usage/test-file-structure) - -[https://pester.dev/docs/v5/usage/mocking](https://pester.dev/docs/v5/usage/mocking) - -[https://pester.dev/docs/v5/usage/testdrive](https://pester.dev/docs/v5/usage/testdrive) +- [https://pester.dev/docs/v5/commands/Context](https://pester.dev/docs/v5/commands/Context) +- [https://pester.dev/docs/v5/usage/test-file-structure](https://pester.dev/docs/v5/usage/test-file-structure) +- [https://pester.dev/docs/v5/usage/mocking](https://pester.dev/docs/v5/usage/mocking) +- [https://pester.dev/docs/v5/usage/testdrive](https://pester.dev/docs/v5/usage/testdrive) ## 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.0](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..ee5b2623 100644 --- a/versioned_docs/version-v5/commands/ConvertTo-JUnitReport.mdx +++ b/versioned_docs/version-v5/commands/ConvertTo-JUnitReport.mdx @@ -1,7 +1,7 @@ --- id: ConvertTo-JUnitReport title: ConvertTo-JUnitReport -description: Help page for the PowerShell Pester "ConvertTo-JUnitReport" command +description: Help for Pester command 'ConvertTo-JUnitReport'. Converts a Pester result-object to an JUnit-compatible XML report keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Converts a Pester result-object to an JUnit-compatible XML report ## SYNTAX ```powershell -ConvertTo-JUnitReport [-Result] [-AsString] [] +ConvertTo-JUnitReport [-Result] [-AsString] ``` ## DESCRIPTION @@ -66,56 +66,70 @@ The returned object is a string. ## PARAMETERS -### -Result +### -AsString -Result object from a Pester-run. -This can be retrieved using Invoke-Pester --Passthru or by using the Run.PassThru configuration-option. +Returns the XML-report as a string. ```yaml -Type: Run -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -AsString +### -Result -Returns the XML-report as a string. +Result object from a Pester-run. +This can be retrieved using Invoke-Pester +-Passthru or by using the Run.PassThru configuration-option. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: Pester.Run +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### Pester.Run + ## OUTPUTS ## NOTES ## RELATED LINKS -[https://pester.dev/docs/v5/commands/ConvertTo-JUnitReport](https://pester.dev/docs/v5/commands/ConvertTo-JUnitReport) - -[https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) +- [https://pester.dev/docs/v5/commands/ConvertTo-JUnitReport](https://pester.dev/docs/v5/commands/ConvertTo-JUnitReport) +- [https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) ## 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.0](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..a37f4e2f 100644 --- a/versioned_docs/version-v5/commands/ConvertTo-NUnitReport.mdx +++ b/versioned_docs/version-v5/commands/ConvertTo-NUnitReport.mdx @@ -1,7 +1,7 @@ --- id: ConvertTo-NUnitReport title: ConvertTo-NUnitReport -description: Help page for the PowerShell Pester "ConvertTo-NUnitReport" command +description: Help for Pester command 'ConvertTo-NUnitReport'. Converts a Pester result-object to an NUnit 2.5 or 3-compatible XML-report keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Converts a Pester result-object to an NUnit 2.5 or 3-compatible XML-report ## SYNTAX ```powershell -ConvertTo-NUnitReport [-Result] [-AsString] [[-Format] ] [] +ConvertTo-NUnitReport [-Result] [[-Format] ] [-AsString] ``` ## DESCRIPTION @@ -77,72 +77,91 @@ The returned object is a string. ## PARAMETERS -### -Result +### -AsString -Result object from a Pester-run. -This can be retrieved using Invoke-Pester --Passthru or by using the Run.PassThru configuration-option. +Returns the XML-report as a string. ```yaml -Type: Run -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -AsString +### -Format -Returns the XML-report as a string. +Specifies the NUnit-schema to be used. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: NUnit2.5 +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Format +### -Result -Specifies the NUnit-schema to be used. +Result object from a Pester-run. +This can be retrieved using Invoke-Pester +-Passthru or by using the Run.PassThru configuration-option. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: NUnit2.5 -Accept pipeline input: False -Accept wildcard characters: False +Type: Pester.Run +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### Pester.Run + ## OUTPUTS ## NOTES ## RELATED LINKS -[https://pester.dev/docs/v5/commands/ConvertTo-NUnitReport](https://pester.dev/docs/v5/commands/ConvertTo-NUnitReport) - -[https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) +- [https://pester.dev/docs/v5/commands/ConvertTo-NUnitReport](https://pester.dev/docs/v5/commands/ConvertTo-NUnitReport) +- [https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) ## 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.0](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..0d68fdb3 100644 --- a/versioned_docs/version-v5/commands/ConvertTo-Pester4Result.mdx +++ b/versioned_docs/version-v5/commands/ConvertTo-Pester4Result.mdx @@ -1,7 +1,7 @@ --- id: ConvertTo-Pester4Result title: ConvertTo-Pester4Result -description: Help page for the PowerShell Pester "ConvertTo-Pester4Result" command +description: Help for Pester command 'ConvertTo-Pester4Result'. Converts a Pester 5 result-object to an Pester 4-compatible object keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Converts a Pester 5 result-object to an Pester 4-compatible object ## SYNTAX ```powershell -ConvertTo-Pester4Result [-PesterResult] [] +ConvertTo-Pester4Result [-PesterResult] ``` ## DESCRIPTION @@ -57,33 +57,42 @@ This can be retrieved using Invoke-Pester -Passthru or by using the Run.PassThru configuration-option. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES ## RELATED LINKS -[https://pester.dev/docs/v5/commands/ConvertTo-Pester4Result](https://pester.dev/docs/v5/commands/ConvertTo-Pester4Result) - -[https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) +- [https://pester.dev/docs/v5/commands/ConvertTo-Pester4Result](https://pester.dev/docs/v5/commands/ConvertTo-Pester4Result) +- [https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) ## 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.0](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..fc412986 100644 --- a/versioned_docs/version-v5/commands/Describe.mdx +++ b/versioned_docs/version-v5/commands/Describe.mdx @@ -1,7 +1,7 @@ --- id: Describe title: Describe -description: Help page for the PowerShell Pester "Describe" command +description: Help for Pester command 'Describe'. Creates a logical group of tests. keywords: - PowerShell - Pester @@ -23,8 +23,7 @@ Creates a logical group of tests. ## SYNTAX ```powershell -Describe [-Name] [-Tag ] [[-Fixture] ] [-Skip] [-ForEach ] - [] +Describe [-Name] [[-Fixture] ] [-Tag ] [-Skip] [-ForEach ] ``` ## DESCRIPTION @@ -32,8 +31,8 @@ Describe [-Name] [-Tag ] [[-Fixture] ] [-Skip] [ Creates a logical group of tests. All Mocks, TestDrive and TestRegistry contents defined within a Describe block are scoped to that Describe; they -will no longer be present when the Describe block exits. -A Describe +will no longer be present when the Describe block exits. + A Describe block may contain any number of Context and It blocks. ## EXAMPLES @@ -74,63 +73,79 @@ Using Describe to group tests logically at the root of the script/container ## PARAMETERS -### -Name +### -Fixture -The name of the test group. -This is often an expressive phrase describing -the scenario being tested. +The actual test script. +If you are following the AAA pattern (Arrange-Act-Assert), +this typically holds the arrange and act sections. +The Asserts will also lie +in this block but are typically nested each in its own It block. +Assertions are +typically performed by the Should command within the It blocks. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Tag +### -ForEach -Optional parameter containing an array of strings. -When calling Invoke-Pester, -it is possible to specify a -Tag parameter which will only execute Describe blocks -containing the same Tag. +Allows data driven tests to be written. +Takes an array of data and generates one block for each item in the array, and makes the item +available as $_ in all child blocks. +When the array is an array of hashtables, it additionally +defines each key in the hashtable as variable. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: Tags - -Required: False -Position: Named -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Fixture +### -Name -The actual test script. -If you are following the AAA pattern (Arrange-Act-Assert), -this typically holds the arrange and act sections. -The Asserts will also lie -in this block but are typically nested each in its own It block. -Assertions are -typically performed by the Should command within the It blocks. +The name of the test group. +This is often an expressive phrase describing +the scenario being tested. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Skip @@ -140,40 +155,53 @@ This is preferable to temporarily commenting out a block, because it remains listed in the output. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ForEach +### -Tag -Allows data driven tests to be written. -Takes an array of data and generates one block for each item in the array, and makes the item -available as $_ in all child blocks. -When the array is an array of hashtables, it additionally -defines each key in the hashtable as variable. +Optional parameter containing an array of strings. +When calling Invoke-Pester, +it is possible to specify a -Tag parameter which will only execute Describe blocks +containing the same Tag. ```yaml -Type: Object -Parameter Sets: (All) +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +- Tags +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -183,14 +211,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/Describe](https://pester.dev/docs/v5/commands/Describe) - -[https://pester.dev/docs/v5/usage/test-file-structure](https://pester.dev/docs/v5/usage/test-file-structure) - -[https://pester.dev/docs/v5/usage/mocking](https://pester.dev/docs/v5/usage/mocking) - -[https://pester.dev/docs/v5/usage/testdrive](https://pester.dev/docs/v5/usage/testdrive) +- [https://pester.dev/docs/v5/commands/Describe](https://pester.dev/docs/v5/commands/Describe) +- [https://pester.dev/docs/v5/usage/test-file-structure](https://pester.dev/docs/v5/usage/test-file-structure) +- [https://pester.dev/docs/v5/usage/mocking](https://pester.dev/docs/v5/usage/mocking) +- [https://pester.dev/docs/v5/usage/testdrive](https://pester.dev/docs/v5/usage/testdrive) ## 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.0](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..21555ecc 100644 --- a/versioned_docs/version-v5/commands/Export-JUnitReport.mdx +++ b/versioned_docs/version-v5/commands/Export-JUnitReport.mdx @@ -1,7 +1,7 @@ --- id: Export-JUnitReport title: Export-JUnitReport -description: Help page for the PowerShell Pester "Export-JUnitReport" command +description: Help for Pester command 'Export-JUnitReport'. Exports a Pester result-object to an JUnit-compatible XML-report keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Exports a Pester result-object to an JUnit-compatible XML-report ## SYNTAX ```powershell -Export-JUnitReport [-Result] [-Path] [] +Export-JUnitReport [-Result] [-Path] ``` ## DESCRIPTION @@ -53,56 +53,70 @@ exports it as an JUnit 4-compatible XML-report. ## PARAMETERS -### -Result +### -Path -Result object from a Pester-run. -This can be retrieved using Invoke-Pester --Passthru or by using the Run.PassThru configuration-option. +The path where the XML-report should be saved. ```yaml -Type: Run -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Path +### -Result -The path where the XML-report should be saved. +Result object from a Pester-run. +This can be retrieved using Invoke-Pester +-Passthru or by using the Run.PassThru configuration-option. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: Pester.Run +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### Pester.Run + ## OUTPUTS ## NOTES ## RELATED LINKS -[https://pester.dev/docs/v5/commands/Export-JUnitReport](https://pester.dev/docs/v5/commands/Export-JUnitReport) - -[https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) +- [https://pester.dev/docs/v5/commands/Export-JUnitReport](https://pester.dev/docs/v5/commands/Export-JUnitReport) +- [https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) ## 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.0](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..244cb865 100644 --- a/versioned_docs/version-v5/commands/Export-NUnitReport.mdx +++ b/versioned_docs/version-v5/commands/Export-NUnitReport.mdx @@ -1,7 +1,7 @@ --- id: Export-NUnitReport title: Export-NUnitReport -description: Help page for the PowerShell Pester "Export-NUnitReport" command +description: Help for Pester command 'Export-NUnitReport'. Exports a Pester result-object to an NUnit-compatible XML-report keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Exports a Pester result-object to an NUnit-compatible XML-report ## SYNTAX ```powershell -Export-NUnitReport [-Result] [-Path] [[-Format] ] [] +Export-NUnitReport [-Result] [-Path] [[-Format] ] ``` ## DESCRIPTION @@ -53,22 +53,25 @@ exports it as an NUnit 2.5-compatible XML-report. ## PARAMETERS -### -Result +### -Format -Result object from a Pester-run. -This can be retrieved using Invoke-Pester --Passthru or by using the Run.PassThru configuration-option. +Specifies the NUnit-schema to be used. ```yaml -Type: Run -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.String +DefaultValue: NUnit2.5 +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Path @@ -76,49 +79,65 @@ Accept wildcard characters: False The path where the XML-report should be saved. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Format +### -Result -Specifies the NUnit-schema to be used. +Result object from a Pester-run. +This can be retrieved using Invoke-Pester +-Passthru or by using the Run.PassThru configuration-option. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: NUnit2.5 -Accept pipeline input: False -Accept wildcard characters: False +Type: Pester.Run +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### Pester.Run + ## OUTPUTS ## NOTES ## RELATED LINKS -[https://pester.dev/docs/v5/commands/Export-NUnitReport](https://pester.dev/docs/v5/commands/Export-NUnitReport) - -[https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) +- [https://pester.dev/docs/v5/commands/Export-NUnitReport](https://pester.dev/docs/v5/commands/Export-NUnitReport) +- [https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) ## 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.0](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..32d2f50f 100644 --- a/versioned_docs/version-v5/commands/Get-ShouldOperator.mdx +++ b/versioned_docs/version-v5/commands/Get-ShouldOperator.mdx @@ -1,7 +1,7 @@ --- id: Get-ShouldOperator title: Get-ShouldOperator -description: Help page for the PowerShell Pester "Get-ShouldOperator" command +description: Help for Pester command 'Get-ShouldOperator'. Display the assertion operators available for use with Should. keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Display the assertion operators available for use with Should. ## SYNTAX ```powershell -Get-ShouldOperator [-Name ] [] +Get-ShouldOperator [[-Name] ] ``` ## DESCRIPTION @@ -60,20 +60,28 @@ Return help examples for the Be assertion operator. Name or alias of operator ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -88,10 +96,9 @@ standard PowerShell discovery patterns (like `Get-Help Should -Parameter *`). ## RELATED LINKS -[https://pester.dev/docs/v5/commands/Get-ShouldOperator](https://pester.dev/docs/v5/commands/Get-ShouldOperator) - -[https://pester.dev/docs/v5/commands/Should](https://pester.dev/docs/v5/commands/Should) +- [https://pester.dev/docs/v5/commands/Get-ShouldOperator](https://pester.dev/docs/v5/commands/Get-ShouldOperator) +- [https://pester.dev/docs/v5/commands/Should](https://pester.dev/docs/v5/commands/Should) ## 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.0](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..cb2d1ac6 100644 --- a/versioned_docs/version-v5/commands/InModuleScope.mdx +++ b/versioned_docs/version-v5/commands/InModuleScope.mdx @@ -1,7 +1,7 @@ --- id: InModuleScope title: InModuleScope -description: Help page for the PowerShell Pester "InModuleScope" command +description: Help for Pester command 'InModuleScope'. Allows you to execute parts of a test script within the scope of a PowerShell script or manifest module. keywords: - PowerShell - Pester @@ -24,8 +24,8 @@ scope of a PowerShell script or manifest module. ## SYNTAX ```powershell -InModuleScope [-ModuleName] [-ScriptBlock] [[-Parameters] ] - [[-ArgumentList] ] [] +InModuleScope [-ModuleName] [-ScriptBlock] [[-Parameters] ] + [[-ArgumentList] ] ``` ## DESCRIPTION @@ -122,39 +122,49 @@ them in using `-Parameters` or `-ArgumentList`. ## PARAMETERS -### -ModuleName +### -ArgumentList -The name of the module into which the test code should be -injected. -This module must already be loaded into the current -PowerShell session. +A optional list of arguments to be passed to the scriptblock. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object[] +DefaultValue: '@()' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ScriptBlock +### -ModuleName -The code to be executed within the script or manifest module. +The name of the module into which the test code should be +injected. +This module must already be loaded into the current +PowerShell session. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Parameters @@ -163,36 +173,49 @@ A optional hashtable of parameters to be passed to the scriptblock. Parameters are automatically made available as variables in the scriptblock. ```yaml -Type: Hashtable -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: @{} -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Collections.Hashtable +DefaultValue: '@{}' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ArgumentList +### -ScriptBlock -A optional list of arguments to be passed to the scriptblock. +The code to be executed within the script or manifest module. ```yaml -Type: Object[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -202,8 +225,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/InModuleScope](https://pester.dev/docs/v5/commands/InModuleScope) +- [https://pester.dev/docs/v5/commands/InModuleScope](https://pester.dev/docs/v5/commands/InModuleScope) ## 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.0](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..223bfcac 100644 --- a/versioned_docs/version-v5/commands/Invoke-Pester.mdx +++ b/versioned_docs/version-v5/commands/Invoke-Pester.mdx @@ -1,7 +1,7 @@ --- id: Invoke-Pester title: Invoke-Pester -description: Help page for the PowerShell Pester "Invoke-Pester" command +description: Help for Pester command 'Invoke-Pester'. Runs Pester tests keywords: - PowerShell - Pester @@ -25,25 +25,25 @@ Runs Pester tests ### Simple (Default) ```powershell -Invoke-Pester [[-Path] ] [-ExcludePath ] [-TagFilter ] - [-ExcludeTagFilter ] [-FullNameFilter ] [-CI] [-Output ] [-PassThru] - [-Container ] [] +Invoke-Pester [[-Path] ] [-ExcludePath ] [-TagFilter ] + [-ExcludeTagFilter ] [-FullNameFilter ] [-CI] [-Output ] [-PassThru] + [-Container ] ``` ### Legacy ```powershell -Invoke-Pester [[-Path] ] [-TagFilter ] [-ExcludeTagFilter ] - [-FullNameFilter ] [-PassThru] [-EnableExit] [-CodeCoverage ] - [-CodeCoverageOutputFile ] [-CodeCoverageOutputFileEncoding ] - [-CodeCoverageOutputFileFormat ] [-Strict] [-OutputFile ] [-OutputFormat ] [-Quiet] - [-PesterOption ] [-Show ] [] +Invoke-Pester [[-Path] ] [[-FullNameFilter] ] [-EnableExit] + [[-TagFilter] ] [-ExcludeTagFilter ] [-PassThru] [-CodeCoverage ] + [-CodeCoverageOutputFile ] [-CodeCoverageOutputFileEncoding ] + [-CodeCoverageOutputFileFormat ] [-Strict] [-OutputFile ] [-OutputFormat ] + [-Quiet] [-PesterOption ] [-Show ] ``` ### Advanced ```powershell -Invoke-Pester [-Configuration ] [] +Invoke-Pester [-Configuration ] ``` ## DESCRIPTION @@ -138,95 +138,6 @@ to see other testresult options like output path and format and their default v ## PARAMETERS -### -Path - -Aliases Script -Specifies one or more paths to files containing tests. -The value is a path\file -name or name pattern. -Wildcards are permitted. - -```yaml -Type: String[] -Parameter Sets: Simple, Legacy -Aliases: Script - -Required: False -Position: 1 -Default value: . -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ExcludePath - -(Deprecated v4) -Replace with ConfigurationProperty Run.ExcludePath - -```yaml -Type: String[] -Parameter Sets: Simple -Aliases: - -Required: False -Position: Named -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -TagFilter - -(Deprecated v4) -Aliases Tag, Tags -Replace with ConfigurationProperty Filter.Tag - -```yaml -Type: String[] -Parameter Sets: Simple, Legacy -Aliases: Tags, Tag - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ExcludeTagFilter - -(Deprecated v4) -Replace with ConfigurationProperty Filter.ExcludeTag - -```yaml -Type: String[] -Parameter Sets: Simple, Legacy -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -FullNameFilter - -(Deprecated v4) -Replace with ConfigurationProperty Filter.FullName - -```yaml -Type: String[] -Parameter Sets: Simple, Legacy -Aliases: Name - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -CI (Introduced v5) @@ -241,113 +152,20 @@ To also enable CodeCoverage use this configuration option: CodeCoverage.Enabled = $true ```yaml -Type: SwitchParameter -Parameter Sets: Simple -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Output - -(Deprecated v4) -Replace with ConfigurationProperty Output.Verbosity -Supports Diagnostic, Detailed, Normal, Minimal, None - -Default value is: Normal - -```yaml -Type: String -Parameter Sets: Simple -Aliases: - -Required: False -Position: Named -Default value: Normal -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PassThru - -Replace with ConfigurationProperty Run.PassThru -Returns a custom object (PSCustomObject) that contains the test results. -By default, Invoke-Pester writes to the host program, not to the output stream (stdout). -If you try to save the result in a variable, the variable is empty unless you -use the PassThru parameter. -To suppress the host output, use the Show parameter set to None. - -```yaml -Type: SwitchParameter -Parameter Sets: Simple, Legacy -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Container - -Specifies one or more ContainerInfo-objects that define containers with tests. -ContainerInfo-objects are generated using New-PesterContainer. -Useful for -scenarios where data-driven test are generated, e.g. -parametrized test files. - -```yaml -Type: ContainerInfo[] -Parameter Sets: Simple -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Configuration - -[PesterConfiguration] object for Advanced Configuration created using `New-PesterConfiguration`. -For help on each option see about_PesterConfiguration or inspect the object. - -```yaml -Type: PesterConfiguration -Parameter Sets: Advanced -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EnableExit - -(Deprecated v4) -Replace with ConfigurationProperty Run.Exit -Will cause Invoke-Pester to exit with a exit code equal to the number of failed -tests once all tests have been run. -Use this to "fail" a build when any tests fail. - -```yaml -Type: SwitchParameter -Parameter Sets: Legacy -Aliases: - -Required: False -Position: 3 -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CodeCoverage @@ -403,15 +221,20 @@ Default is line 1. Default is the last line of the script. ```yaml -Type: Object[] -Parameter Sets: Legacy -Aliases: - -Required: False -Position: Named -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object[] +DefaultValue: '@()' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CodeCoverageOutputFile @@ -424,15 +247,20 @@ a required extension (usually the xml). If this path is not provided, no file will be generated. ```yaml -Type: String -Parameter Sets: Legacy -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CodeCoverageOutputFileEncoding @@ -443,15 +271,20 @@ Sets the output encoding of CodeCoverageOutputFileFormat Default is utf8 ```yaml -Type: String -Parameter Sets: Legacy -Aliases: - -Required: False -Position: Named -Default value: Utf8 -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: utf8 +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CodeCoverageOutputFileFormat @@ -467,34 +300,196 @@ The ReportGenerator tool can be used to consolidate multiple reports and provide https://github.com/danielpalme/ReportGenerator ```yaml -Type: String -Parameter Sets: Legacy -Aliases: +Type: System.String +DefaultValue: JaCoCo +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Configuration + +[PesterConfiguration] object for Advanced Configuration created using `New-PesterConfiguration`. +For help on each option see about_PesterConfiguration or inspect the object. -Required: False -Position: Named -Default value: JaCoCo -Accept pipeline input: False -Accept wildcard characters: False +```yaml +Type: PesterConfiguration +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Advanced + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Strict +### -Container + +Specifies one or more ContainerInfo-objects that define containers with tests. +ContainerInfo-objects are generated using New-PesterContainer. +Useful for +scenarios where data-driven test are generated, e.g. +parametrized test files. + +```yaml +Type: Pester.ContainerInfo[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -EnableExit (Deprecated v4) -Makes Pending and Skipped tests to Failed tests. -Useful for continuous -integration where you need to make sure all tests passed. +Replace with ConfigurationProperty Run.Exit +Will cause Invoke-Pester to exit with a exit code equal to the number of failed +tests once all tests have been run. +Use this to "fail" a build when any tests fail. + +```yaml +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -ExcludePath + +(Deprecated v4) +Replace with ConfigurationProperty Run.ExcludePath ```yaml -Type: SwitchParameter -Parameter Sets: Legacy +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -ExcludeTagFilter + +(Deprecated v4) +Replace with ConfigurationProperty Filter.ExcludeTag + +```yaml +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -FullNameFilter + +(Deprecated v4) +Replace with ConfigurationProperty Filter.FullName + +```yaml +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false Aliases: +- Name +ParameterSets: +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Legacy + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Output + +(Deprecated v4) +Replace with ConfigurationProperty Output.Verbosity +Supports Diagnostic, Detailed, Normal, Minimal, None -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Default value is: Normal + +```yaml +Type: System.String +DefaultValue: Normal +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -OutputFile @@ -507,15 +502,20 @@ the xml extension. If this path is not provided, no log will be generated. ```yaml -Type: String -Parameter Sets: Legacy -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -OutputFormat @@ -526,39 +526,84 @@ The format of output. Currently NUnitXml and JUnitXml is supported. ```yaml -Type: String -Parameter Sets: Legacy -Aliases: +Type: System.String +DefaultValue: NUnitXml +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` -Required: False -Position: Named -Default value: NUnitXml -Accept pipeline input: False -Accept wildcard characters: False +### -PassThru + +Replace with ConfigurationProperty Run.PassThru +Returns a custom object (PSCustomObject) that contains the test results. +By default, Invoke-Pester writes to the host program, not to the output stream (stdout). +If you try to save the result in a variable, the variable is empty unless you +use the PassThru parameter. +To suppress the host output, use the Show parameter set to None. + +```yaml +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Quiet +### -Path -(Deprecated v4) -The parameter Quiet is deprecated since Pester v4.0 and will be deleted -in the next major version of Pester. -Please use the parameter Show -with value 'None' instead. -The parameter Quiet suppresses the output that Pester writes to the host program, -including the result summary and CodeCoverage output. -This parameter does not affect the PassThru custom object or the XML output that -is written when you use the Output parameters. +Aliases Script +Specifies one or more paths to files containing tests. +The value is a path\file +name or name pattern. +Wildcards are permitted. ```yaml -Type: SwitchParameter -Parameter Sets: Legacy +Type: System.String[] +DefaultValue: . +SupportsWildcards: false Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +- Script +ParameterSets: +- Name: Legacy + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Simple + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -PesterOption @@ -574,15 +619,49 @@ in which the keys are option names and the values are option values. For more information on the options available, see the help for New-PesterOption. ```yaml -Type: Object -Parameter Sets: Legacy -Aliases: +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Quiet + +(Deprecated v4) +The parameter Quiet is deprecated since Pester v4.0 and will be deleted +in the next major version of Pester. +Please use the parameter Show +with value 'None' instead. +The parameter Quiet suppresses the output that Pester writes to the host program, +including the result summary and CodeCoverage output. +This parameter does not affect the PassThru custom object or the XML output that +is written when you use the Output parameters. -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +```yaml +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Show @@ -615,21 +694,83 @@ This parameter does not affect the PassThru custom object or the XML output that is written when you use the Output parameters. ```yaml -Type: OutputTypes -Parameter Sets: Legacy -Aliases: -Accepted values: None, Default, Passed, Failed, Pending, Skipped, Inconclusive, Describe, Context, Summary, Header, Fails, All +Type: Pester.OutputTypes +DefaultValue: All +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` -Required: False -Position: Named -Default value: All -Accept pipeline input: False -Accept wildcard characters: False +### -Strict + +(Deprecated v4) +Makes Pending and Skipped tests to Failed tests. +Useful for continuous +integration where you need to make sure all tests passed. + +```yaml +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -TagFilter + +(Deprecated v4) +Aliases Tag, Tags +Replace with ConfigurationProperty Filter.Tag + +```yaml +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: +- Tags +- Tag +ParameterSets: +- Name: Legacy + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -639,10 +780,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) - -[https://pester.dev/docs/v5/quick-start](https://pester.dev/docs/v5/quick-start) +- [https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) +- [https://pester.dev/docs/v5/quick-start](https://pester.dev/docs/v5/quick-start) ## 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.0](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..04f69c2c 100644 --- a/versioned_docs/version-v5/commands/It.mdx +++ b/versioned_docs/version-v5/commands/It.mdx @@ -1,7 +1,7 @@ --- id: It title: It -description: Help page for the PowerShell Pester "It" command +description: Help for Pester command 'It'. Validates the results of a test inside of a Describe block. keywords: - PowerShell - Pester @@ -25,21 +25,19 @@ Validates the results of a test inside of a Describe block. ### Normal (Default) ```powershell -It [-Name] [[-Test] ] [-ForEach ] [-Tag ] [] +It [-Name] [[-Test] ] [-ForEach ] [-Tag ] ``` ### Pending ```powershell -It [-Name] [[-Test] ] [-ForEach ] [-Tag ] [-Pending] - [] +It [-Name] [[-Test] ] [-ForEach ] [-Tag ] [-Pending] ``` ### Skip ```powershell -It [-Name] [[-Test] ] [-ForEach ] [-Tag ] [-Skip] - [] +It [-Name] [[-Test] ] [-ForEach ] [-Tag ] [-Skip] ``` ## DESCRIPTION @@ -127,79 +125,53 @@ current hashtable are made available as variables inside It. ## PARAMETERS -### -Name - -An expressive phrase describing the expected test outcome. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Test - -The script block that should throw an exception if the -expectation of the test is not met.If you are following the -AAA pattern (Arrange-Act-Assert), this typically holds the -Assert. - -```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -ForEach (Formerly called TestCases.) Optional array of hashtable (or any IDictionary) objects. If this parameter is used, Pester will call the test script block once for each table in -the ForEach array, splatting the dictionary to the test script block as input. -If you want +the ForEach array, splatting the dictionary to the test script block as input. + If you want the name of the test to appear differently for each test case, you can embed tokens into the Name parameter with the syntax 'Adds numbers <A> and <B>' (assuming you have keys named A and B in your ForEach hashtables.) ```yaml -Type: Object[] -Parameter Sets: (All) -Aliases: TestCases - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object[] +DefaultValue: '' +SupportsWildcards: false +Aliases: +- TestCases +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Tag +### -Name -Optional parameter containing an array of strings. -When calling Invoke-Pester, -it is possible to include or exclude tests containing the same Tag. +An expressive phrase describing the expected test outcome. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Pending @@ -211,15 +183,20 @@ An empty test, that is a test that contains nothing except whitespace or comments is marked as Pending by default. ```yaml -Type: SwitchParameter -Parameter Sets: Pending -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Pending + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Skip @@ -229,20 +206,75 @@ This is preferable to temporarily commenting out a test, because the test remains listed in the output. ```yaml -Type: SwitchParameter -Parameter Sets: Skip -Aliases: +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Skip + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +### -Tag + +Optional parameter containing an array of strings. +When calling Invoke-Pester, +it is possible to include or exclude tests containing the same Tag. + +```yaml +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Test + +The script block that should throw an exception if the +expectation of the test is not met.If you are following the +AAA pattern (Arrange-Act-Assert), this typically holds the +Assert. + +```yaml +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -252,14 +284,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/It](https://pester.dev/docs/v5/commands/It) - -[https://pester.dev/docs/v5/commands/Describe](https://pester.dev/docs/v5/commands/Describe) - -[https://pester.dev/docs/v5/commands/Context](https://pester.dev/docs/v5/commands/Context) - -[https://pester.dev/docs/v5/commands/Set-ItResult](https://pester.dev/docs/v5/commands/Set-ItResult) +- [https://pester.dev/docs/v5/commands/It](https://pester.dev/docs/v5/commands/It) +- [https://pester.dev/docs/v5/commands/Describe](https://pester.dev/docs/v5/commands/Describe) +- [https://pester.dev/docs/v5/commands/Context](https://pester.dev/docs/v5/commands/Context) +- [https://pester.dev/docs/v5/commands/Set-ItResult](https://pester.dev/docs/v5/commands/Set-ItResult) ## 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.0](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..b4976af7 100644 --- a/versioned_docs/version-v5/commands/Mock.mdx +++ b/versioned_docs/version-v5/commands/Mock.mdx @@ -1,7 +1,7 @@ --- id: Mock title: Mock -description: Help page for the PowerShell Pester "Mock" command +description: Help for Pester command 'Mock'. Mocks the behavior of an existing command with an alternate implementation. keywords: - PowerShell - Pester @@ -24,9 +24,9 @@ implementation. ## SYNTAX ```powershell -Mock [[-CommandName] ] [[-MockWith] ] [-Verifiable] [[-ParameterFilter] ] - [[-ModuleName] ] [[-RemoveParameterType] ] [[-RemoveParameterValidation] ] - [] +Mock [[-CommandName] ] [[-MockWith] ] [[-ParameterFilter] ] + [[-ModuleName] ] [[-RemoveParameterType] ] + [[-RemoveParameterValidation] ] [-Verifiable] ``` ## DESCRIPTION @@ -191,15 +191,20 @@ mocked by using the -ModuleName parameter. The name of the command to be mocked. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -MockWith @@ -212,32 +217,45 @@ being mocked, and the MockWith script block can contain references to the mocked commands parameter variables. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: {} -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '{}' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Verifiable +### -ModuleName -When this is set, the mock will be checked when Should -InvokeVerifiable is -called. +Optional string specifying the name of the module where this command +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. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ParameterFilter @@ -250,35 +268,20 @@ This ScriptBlock must return a boolean value. See examples for usage. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ModuleName - -Optional string specifying the name of the module where this command -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. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -RemoveParameterType @@ -290,15 +293,20 @@ type requirements and allows some strongly typed functions to be mocked more easily. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 5 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -RemoveParameterValidation @@ -310,20 +318,50 @@ validation requirements, and allows functions that are strict about their parameter validation to be mocked more easily. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 6 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 5 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Verifiable + +When this is set, the mock will be checked when Should -InvokeVerifiable is +called. + +```yaml +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -333,10 +371,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/Mock](https://pester.dev/docs/v5/commands/Mock) - -[https://pester.dev/docs/v5/usage/mocking](https://pester.dev/docs/v5/usage/mocking) +- [https://pester.dev/docs/v5/commands/Mock](https://pester.dev/docs/v5/commands/Mock) +- [https://pester.dev/docs/v5/usage/mocking](https://pester.dev/docs/v5/usage/mocking) ## 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.0](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..1f770d81 100644 --- a/versioned_docs/version-v5/commands/New-Fixture.mdx +++ b/versioned_docs/version-v5/commands/New-Fixture.mdx @@ -1,7 +1,7 @@ --- id: New-Fixture title: New-Fixture -description: Help page for the PowerShell Pester "New-Fixture" command +description: Help for Pester command 'New-Fixture'. This function generates two scripts, one that defines a function and another one that contains its tests. keywords: - PowerShell - Pester @@ -24,7 +24,7 @@ and another one that contains its tests. ## SYNTAX ```powershell -New-Fixture [-Name] [[-Path] ] [] +New-Fixture [-Name] [[-Path] ] ``` ## DESCRIPTION @@ -90,15 +90,20 @@ Creates a new folder named Cleaner in the current directory and creates the scri Defines the name of the function and the name of the test to be created. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Path @@ -107,20 +112,28 @@ Defines path where the test and the function should be created, you can use full If the parameter is not specified the scripts are created in the current directory. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: $PWD -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: $PWD +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -130,16 +143,12 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/New-Fixture](https://pester.dev/docs/v5/commands/New-Fixture) - -[https://pester.dev/docs/v5/commands/Describe](https://pester.dev/docs/v5/commands/Describe) - -[https://pester.dev/docs/v5/commands/Context](https://pester.dev/docs/v5/commands/Context) - -[https://pester.dev/docs/v5/commands/It](https://pester.dev/docs/v5/commands/It) - -[https://pester.dev/docs/v5/commands/Should](https://pester.dev/docs/v5/commands/Should) +- [https://pester.dev/docs/v5/commands/New-Fixture](https://pester.dev/docs/v5/commands/New-Fixture) +- [https://pester.dev/docs/v5/commands/Describe](https://pester.dev/docs/v5/commands/Describe) +- [https://pester.dev/docs/v5/commands/Context](https://pester.dev/docs/v5/commands/Context) +- [https://pester.dev/docs/v5/commands/It](https://pester.dev/docs/v5/commands/It) +- [https://pester.dev/docs/v5/commands/Should](https://pester.dev/docs/v5/commands/Should) ## 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.0](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..d138a9cf 100644 --- a/versioned_docs/version-v5/commands/New-MockObject.mdx +++ b/versioned_docs/version-v5/commands/New-MockObject.mdx @@ -1,7 +1,7 @@ --- id: New-MockObject title: New-MockObject -description: Help page for the PowerShell Pester "New-MockObject" command +description: Help for Pester command 'New-MockObject'. This function instantiates a .NET object from a type. keywords: - PowerShell - Pester @@ -25,15 +25,15 @@ This function instantiates a .NET object from a type. ### Type (Default) ```powershell -New-MockObject [-Type] [-Properties ] [-Methods ] [-MethodHistoryPrefix ] - [] +New-MockObject [-Type] [-Properties ] [-Methods ] + [-MethodHistoryPrefix ] ``` ### InputObject ```powershell -New-MockObject -InputObject [-Properties ] [-Methods ] - [-MethodHistoryPrefix ] [] +New-MockObject -InputObject [-Properties ] [-Methods ] + [-MethodHistoryPrefix ] ``` ## DESCRIPTION @@ -101,56 +101,48 @@ to mock output using an internal module class. ## PARAMETERS -### -Type - -The .NET type to create. -This creates the object without calling any of its constructors or initializers. -Use this to instantiate an object that does not have a public constructor. -If your object has a constructor, or is giving you errors, try using the constructor and provide the object using the InputObject parameter to decorate it. - -```yaml -Type: Type -Parameter Sets: Type -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -InputObject An already constructed object to decorate. Use `New-Object` or `[typeName]::new()` to create it. ```yaml -Type: Object -Parameter Sets: InputObject -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: InputObject + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Properties +### -MethodHistoryPrefix -Properties to define, specified as a hashtable, in format `@{ PropertyName = value }`. +Prefix for the history-property created for each mocked method. +Default is '_' which would create the property '_MethodName'. ```yaml -Type: Hashtable -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: _ +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Methods @@ -164,37 +156,85 @@ Method overloads are not supported because ScriptMethods are used to decorate th For each method a property named `_MethodName` (if using default `-MethodHistoryPrefix`) is defined which holds history of the invocations of the method and the arguments that were provided. ```yaml -Type: Hashtable -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Collections.Hashtable +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: InputObject + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Type + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -MethodHistoryPrefix +### -Properties -Prefix for the history-property created for each mocked method. -Default is '_' which would create the property '_MethodName'. +Properties to define, specified as a hashtable, in format `@{ PropertyName = value }`. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: _ -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Collections.Hashtable +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: InputObject + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Type + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Type + +The .NET type to create. +This creates the object without calling any of its constructors or initializers. +Use this to instantiate an object that does not have a public constructor. +If your object has a constructor, or is giving you errors, try using the constructor and provide the object using the InputObject parameter to decorate it. + +```yaml +Type: System.Type +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Type + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -204,10 +244,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/New-MockObject](https://pester.dev/docs/v5/commands/New-MockObject) - -[https://pester.dev/docs/v5/usage/mocking](https://pester.dev/docs/v5/usage/mocking) +- [https://pester.dev/docs/v5/commands/New-MockObject](https://pester.dev/docs/v5/commands/New-MockObject) +- [https://pester.dev/docs/v5/usage/mocking](https://pester.dev/docs/v5/usage/mocking) ## 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.0](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..86525b9f 100644 --- a/versioned_docs/version-v5/commands/New-PesterConfiguration.mdx +++ b/versioned_docs/version-v5/commands/New-PesterConfiguration.mdx @@ -1,7 +1,7 @@ --- id: New-PesterConfiguration title: New-PesterConfiguration -description: Help page for the PowerShell Pester "New-PesterConfiguration" command +description: Help for Pester command 'New-PesterConfiguration'. Creates a new PesterConfiguration object for advanced configuration of Invoke-Pester. keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Creates a new PesterConfiguration object for advanced configuration of Invoke-Pe ## SYNTAX ```powershell -New-PesterConfiguration [[-Hashtable] ] [] +New-PesterConfiguration [[-Hashtable] ] ``` ## DESCRIPTION @@ -88,20 +88,28 @@ See about_PesterConfiguration help topic or inspect a PesterConfiguration-object available options. ```yaml -Type: IDictionary -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Collections.IDictionary +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -111,12 +119,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/New-PesterConfiguration](https://pester.dev/docs/v5/commands/New-PesterConfiguration) - -[https://pester.dev/docs/v5/usage/Configuration](https://pester.dev/docs/v5/usage/Configuration) - -[https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) +- [https://pester.dev/docs/v5/commands/New-PesterConfiguration](https://pester.dev/docs/v5/commands/New-PesterConfiguration) +- [https://pester.dev/docs/v5/usage/Configuration](https://pester.dev/docs/v5/usage/Configuration) +- [https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) ## 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.0](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..0cb9f47c 100644 --- a/versioned_docs/version-v5/commands/New-PesterContainer.mdx +++ b/versioned_docs/version-v5/commands/New-PesterContainer.mdx @@ -1,7 +1,7 @@ --- id: New-PesterContainer title: New-PesterContainer -description: Help page for the PowerShell Pester "New-PesterContainer" command +description: Help for Pester command 'New-PesterContainer'. Generates ContainerInfo-objects used as for Invoke-Pester -Container keywords: - PowerShell - Pester @@ -25,13 +25,13 @@ Generates ContainerInfo-objects used as for Invoke-Pester -Container ### Path (Default) ```powershell -New-PesterContainer -Path [-Data ] [] +New-PesterContainer -Path [-Data ] ``` ### ScriptBlock ```powershell -New-PesterContainer -ScriptBlock [-Data ] [] +New-PesterContainer -ScriptBlock [-Data ] ``` ## DESCRIPTION @@ -80,6 +80,28 @@ the required ContainerInfo-object that enables us to do this directly. ## PARAMETERS +### -Data + +Allows a dictionary to be provided with parameter-values that should be used during +execution of the test containers defined in Path or ScriptBlock. + +```yaml +Type: System.Collections.IDictionary[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + ### -Path Specifies one or more paths to files containing tests. @@ -88,15 +110,20 @@ name or name pattern. Wildcards are permitted. ```yaml -Type: String[] -Parameter Sets: Path -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Path + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ScriptBlock @@ -104,37 +131,28 @@ Accept wildcard characters: False Specifies one or more scriptblocks containing tests. ```yaml -Type: ScriptBlock[] -Parameter Sets: ScriptBlock -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Data - -Allows a dictionary to be provided with parameter-values that should be used during -execution of the test containers defined in Path or ScriptBlock. - -```yaml -Type: IDictionary[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: ScriptBlock + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -144,12 +162,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/New-PesterContainer](https://pester.dev/docs/v5/commands/New-PesterContainer) - -[https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) - -[https://pester.dev/docs/v5/usage/data-driven-tests](https://pester.dev/docs/v5/usage/data-driven-tests) +- [https://pester.dev/docs/v5/commands/New-PesterContainer](https://pester.dev/docs/v5/commands/New-PesterContainer) +- [https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) +- [https://pester.dev/docs/v5/usage/data-driven-tests](https://pester.dev/docs/v5/usage/data-driven-tests) ## 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.0](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..8f971c91 100644 --- a/versioned_docs/version-v5/commands/Set-ItResult.mdx +++ b/versioned_docs/version-v5/commands/Set-ItResult.mdx @@ -1,7 +1,7 @@ --- id: Set-ItResult title: Set-ItResult -description: Help page for the PowerShell Pester "Set-ItResult" command +description: Help for Pester command 'Set-ItResult'. Set-ItResult is used inside the It block to explicitly set the test result keywords: - PowerShell - Pester @@ -25,19 +25,19 @@ Set-ItResult is used inside the It block to explicitly set the test result ### Inconclusive ```powershell -Set-ItResult [-Inconclusive] [-Because ] [] +Set-ItResult [-Inconclusive] [-Because ] ``` ### Pending ```powershell -Set-ItResult [-Pending] [-Because ] [] +Set-ItResult [-Pending] [-Because ] ``` ### Skipped ```powershell -Set-ItResult [-Skipped] [-Because ] [] +Set-ItResult [-Skipped] [-Because ] ``` ## DESCRIPTION @@ -78,21 +78,49 @@ Tests Passed: 0, Failed: 0, Skipped: 1, Inconclusive: 1, NotRun: 0 ## PARAMETERS +### -Because + +Similarly to failing tests, skipped and inconclusive tests should have reason. +It allows +to provide information to the user why the test is neither successful nor failed. + +```yaml +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + ### -Inconclusive Sets the test result to inconclusive. Cannot be used at the same time as -Pending or -Skipped ```yaml -Type: SwitchParameter -Parameter Sets: Inconclusive -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Inconclusive + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Pending @@ -101,15 +129,20 @@ Accept wildcard characters: False Cannot be used at the same time as -Inconclusive or -Skipped ```yaml -Type: SwitchParameter -Parameter Sets: Pending -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Pending + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Skipped @@ -118,38 +151,28 @@ Sets the test result to skipped. Cannot be used at the same time as -Inconclusive or -Pending ```yaml -Type: SwitchParameter -Parameter Sets: Skipped -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Because - -Similarly to failing tests, skipped and inconclusive tests should have reason. -It allows -to provide information to the user why the test is neither successful nor failed. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Skipped + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -159,8 +182,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/Set-ItResult](https://pester.dev/docs/v5/commands/Set-ItResult) +- [https://pester.dev/docs/v5/commands/Set-ItResult](https://pester.dev/docs/v5/commands/Set-ItResult) ## 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.0](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..de8dbbe2 100644 --- a/versioned_docs/version-v5/commands/Should.mdx +++ b/versioned_docs/version-v5/commands/Should.mdx @@ -1,7 +1,7 @@ --- id: Should title: Should -description: Help page for the PowerShell Pester "Should" command +description: Help for Pester command 'Should'. Should is a keyword that is used to define an assertion inside an It block. keywords: - PowerShell - Pester @@ -25,185 +25,176 @@ Should is a keyword that is used to define an assertion inside an It block. ### Be ```powershell -Should [[-ActualValue] ] [-Be] [-Not] [-ExpectedValue ] - [-Because ] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Be] [-Not] ``` ### BeExactly ```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeExactly] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] + [-BeExactly] ``` ### BeGreaterThan ```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeGreaterThan] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] + [-BeGreaterThan] ``` ### BeLessOrEqual ```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeLessOrEqual] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] + [-BeLessOrEqual] ``` ### BeIn ```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeIn] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] [-BeIn] ``` ### BeLessThan ```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeLessThan] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] + [-BeLessThan] ``` ### BeGreaterOrEqual ```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeGreaterOrEqual] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] + [-BeGreaterOrEqual] ``` ### BeLike ```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeLike] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] [-BeLike] ``` ### BeLikeExactly ```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeLikeExactly] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] + [-BeLikeExactly] ``` ### BeNullOrEmpty ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-BeNullOrEmpty] [] +Should [[-ActualValue] ] [[-Because] ] [-Not] [-BeNullOrEmpty] ``` ### BeOfType ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] [-BeOfType] - [-ExpectedType ] [] +Should [[-ActualValue] ] [[-ExpectedType] ] [[-Because] ] [-Not] [-BeOfType] ``` ### BeTrue ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] [-BeTrue] - [] +Should [[-ActualValue] ] [[-Because] ] [-Not] [-BeTrue] ``` ### BeFalse ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] [-BeFalse] - [] +Should [[-ActualValue] ] [[-Because] ] [-Not] [-BeFalse] ``` ### Contain ```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-Contain] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] [-Contain] ``` ### Exist ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] [-Exist] - [] +Should [[-ActualValue] ] [[-Because] ] [-Not] [-Exist] ``` ### FileContentMatch ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-FileContentMatch] [-ExpectedContent ] [] +Should [[-ActualValue] ] [[-ExpectedContent] ] [[-Because] ] [-Not] + [-FileContentMatch] ``` ### FileContentMatchExactly ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-ExpectedContent ] [-FileContentMatchExactly] [] +Should [[-ActualValue] ] [[-ExpectedContent] ] [[-Because] ] [-Not] + [-FileContentMatchExactly] ``` ### FileContentMatchMultiline ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-ExpectedContent ] [-FileContentMatchMultiline] [] +Should [[-ActualValue] ] [[-ExpectedContent] ] [[-Because] ] [-Not] + [-FileContentMatchMultiline] ``` ### FileContentMatchMultilineExactly ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-ExpectedContent ] [-FileContentMatchMultilineExactly] [] +Should [[-ActualValue] ] [[-ExpectedContent] ] [[-Because] ] [-Not] + [-FileContentMatchMultilineExactly] ``` ### HaveCount ```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-HaveCount] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] + [-HaveCount] ``` ### HaveParameter ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-HaveParameter] [-ParameterName ] [-Type ] [-DefaultValue ] [-Mandatory] - [-InParameterSet ] [-HasArgumentCompleter] [-Alias ] [] +Should [[-ActualValue] ] [[-ParameterName] ] [[-Type] ] + [[-DefaultValue] ] [-Mandatory] [[-InParameterSet] ] [-HasArgumentCompleter] + [[-Alias] ] [[-Because] ] [-Not] [-HaveParameter] ``` ### Match ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] [-Match] - [-RegularExpression ] [] +Should [[-ActualValue] ] [[-RegularExpression] ] [[-Because] ] [-Not] + [-Match] ``` ### MatchExactly ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-RegularExpression ] [-MatchExactly] [] +Should [[-ActualValue] ] [[-RegularExpression] ] [[-Because] ] [-Not] + [-MatchExactly] ``` ### Throw ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] [-Throw] - [-ExpectedMessage ] [-ErrorId ] [-ExceptionType ] [-PassThru] [] +Should [[-ActualValue] ] [[-ExpectedMessage] ] [[-ErrorId] ] + [[-ExceptionType] ] [[-Because] ] [-PassThru] [-Not] [-Throw] ``` ### InvokeVerifiable ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-InvokeVerifiable] [] +Should [[-ActualValue] ] [[-Because] ] [-Not] [-InvokeVerifiable] ``` ### Invoke ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] [-Invoke] - [-CommandName ] [-Times ] [-ParameterFilter ] [-ExclusiveFilter ] - [-ModuleName ] [-Scope ] [-Exactly] [-CallerSessionState ] [] +Should [[-ActualValue] ] [[-CommandName] ] [[-Times] ] + [[-ParameterFilter] ] [[-ExclusiveFilter] ] [[-ModuleName] ] + [[-Scope] ] [-Exactly] [[-Because] ] [[-CallerSessionState] ] [-Not] + [-Invoke] ``` ## DESCRIPTION @@ -295,32 +286,41 @@ The actual value that was obtained in the test which should be verified against a expected value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: true +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Alias -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 7 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Be @@ -328,49 +328,214 @@ Accept wildcard characters: False Compares one object with another for equality and throws if the two objects are not the same. ```yaml -Type: SwitchParameter -Parameter Sets: Be -Aliases: EQ - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- EQ +ParameterSets: +- Name: Be + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Because -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Be + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeExactly + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterThan + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessOrEqual + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeIn + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessThan + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterOrEqual + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLike + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLikeExactly + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeNullOrEmpty + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeOfType + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeTrue + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeFalse + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Contain + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Exist + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatch + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchExactly + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchMultiline + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchMultilineExactly + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: HaveCount + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: HaveParameter + Position: 8 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Match + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: MatchExactly + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Throw + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: InvokeVerifiable + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Invoke + Position: 8 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeExactly -Compares one object with another for equality and throws if the two objects are not the same. -This comparison is case sensitive. +Compares one object with another for equality and throws if the two objects are not the same. This comparison is case sensitive. ```yaml -Type: SwitchParameter -Parameter Sets: BeExactly -Aliases: CEQ - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- CEQ +ParameterSets: +- Name: BeExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeFalse @@ -378,151 +543,192 @@ Accept wildcard characters: False Asserts that the value is false, or falsy. ```yaml -Type: SwitchParameter -Parameter Sets: BeFalse -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeFalse + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeGreaterOrEqual -Asserts that a number (or other comparable value) is greater than or equal to an expected value. -Uses PowerShell's -ge operator to compare the two values. +Asserts that a number (or other comparable value) is greater than or equal to an expected value. Uses PowerShell's -ge operator to compare the two values. ```yaml -Type: SwitchParameter -Parameter Sets: BeGreaterOrEqual -Aliases: GE - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- GE +ParameterSets: +- Name: BeGreaterOrEqual + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeGreaterThan -Asserts that a number (or other comparable value) is greater than an expected value. -Uses PowerShell's -gt operator to compare the two values. +Asserts that a number (or other comparable value) is greater than an expected value. Uses PowerShell's -gt operator to compare the two values. ```yaml -Type: SwitchParameter -Parameter Sets: BeGreaterThan -Aliases: GT - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- GT +ParameterSets: +- Name: BeGreaterThan + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeIn -Asserts that a collection of values contain a specific value. -Uses PowerShell's -contains operator to confirm. +Asserts that a collection of values contain a specific value. Uses PowerShell's -contains operator to confirm. ```yaml -Type: SwitchParameter -Parameter Sets: BeIn -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeIn + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeLessOrEqual -Asserts that a number (or other comparable value) is lower than, or equal to an expected value. -Uses PowerShell's -le operator to compare the two values. +Asserts that a number (or other comparable value) is lower than, or equal to an expected value. Uses PowerShell's -le operator to compare the two values. ```yaml -Type: SwitchParameter -Parameter Sets: BeLessOrEqual -Aliases: LE - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- LE +ParameterSets: +- Name: BeLessOrEqual + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeLessThan -Asserts that a number (or other comparable value) is lower than an expected value. -Uses PowerShell's -lt operator to compare the two values. +Asserts that a number (or other comparable value) is lower than an expected value. Uses PowerShell's -lt operator to compare the two values. ```yaml -Type: SwitchParameter -Parameter Sets: BeLessThan -Aliases: LT - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- LT +ParameterSets: +- Name: BeLessThan + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeLike -Asserts that the actual value matches a wildcard pattern using PowerShell's -like operator. -This comparison is not case-sensitive. +Asserts that the actual value matches a wildcard pattern using PowerShell's -like operator. This comparison is not case-sensitive. ```yaml -Type: SwitchParameter -Parameter Sets: BeLike -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeLike + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeLikeExactly -Asserts that the actual value matches a wildcard pattern using PowerShell's -like operator. -This comparison is case-sensitive. +Asserts that the actual value matches a wildcard pattern using PowerShell's -like operator. This comparison is case-sensitive. ```yaml -Type: SwitchParameter -Parameter Sets: BeLikeExactly -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeLikeExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeNullOrEmpty -Checks values for null or empty (strings). -The static [String]::IsNullOrEmpty() method is used to do the comparison. +Checks values for null or empty (strings). The static [String]::IsNullOrEmpty() method is used to do the comparison. ```yaml -Type: SwitchParameter -Parameter Sets: BeNullOrEmpty -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeNullOrEmpty + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeOfType @@ -530,15 +736,21 @@ Accept wildcard characters: False Asserts that the actual value should be an object of a specified type (or a subclass of the specified type) using PowerShell's -is operator. ```yaml -Type: SwitchParameter -Parameter Sets: BeOfType -Aliases: HaveType - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- HaveType +ParameterSets: +- Name: BeOfType + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeTrue @@ -546,271 +758,413 @@ Accept wildcard characters: False Asserts that the value is true, or truthy. ```yaml -Type: SwitchParameter -Parameter Sets: BeTrue -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeTrue + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CallerSessionState -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 9 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CommandName -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Contain -Asserts that collection contains a specific value. -Uses PowerShell's -contains operator to confirm. +Asserts that collection contains a specific value. Uses PowerShell's -contains operator to confirm. ```yaml -Type: SwitchParameter -Parameter Sets: Contain -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Contain + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -DefaultValue -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ErrorId -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Throw + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Exactly -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: SwitchParameter -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 7 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExceptionType -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Throw + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExclusiveFilter -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Exist -Does not perform any comparison, but checks if the object calling Exist is present in a PS Provider. -The object must have valid path syntax. -It essentially must pass a Test-Path call. +Does not perform any comparison, but checks if the object calling Exist is present in a PS Provider. The object must have valid path syntax. It essentially must pass a Test-Path call. ```yaml -Type: SwitchParameter -Parameter Sets: Exist -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Exist + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExpectedContent -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: FileContentMatch, FileContentMatchExactly, FileContentMatchMultiline, FileContentMatchMultilineExactly -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FileContentMatch + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchExactly + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchMultiline + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchMultilineExactly + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExpectedMessage -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Throw + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExpectedType -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: BeOfType -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeOfType + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExpectedValue -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Be, BeExactly, BeGreaterThan, BeLessOrEqual, BeIn, BeLessThan, BeGreaterOrEqual, BeLike, BeLikeExactly, Contain, HaveCount -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Be + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeExactly + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterThan + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessOrEqual + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeIn + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessThan + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterOrEqual + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLike + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLikeExactly + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Contain + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: HaveCount + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -FileContentMatch -Checks to see if a file contains the specified text. -This search is not case sensitive and uses regular expressions. +Checks to see if a file contains the specified text. This search is not case sensitive and uses regular expressions. ```yaml -Type: SwitchParameter -Parameter Sets: FileContentMatch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FileContentMatch + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -FileContentMatchExactly -Checks to see if a file contains the specified text. -This search is case sensitive and uses regular expressions to match the text. +Checks to see if a file contains the specified text. This search is case sensitive and uses regular expressions to match the text. ```yaml -Type: SwitchParameter -Parameter Sets: FileContentMatchExactly -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FileContentMatchExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -FileContentMatchMultiline @@ -820,15 +1174,20 @@ As opposed to FileContentMatch and FileContentMatchExactly operators, FileConten When using FileContentMatchMultiline operator, '^' and '$' represent the beginning and end of the whole file, instead of the beginning and end of a line ```yaml -Type: SwitchParameter -Parameter Sets: FileContentMatchMultiline -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FileContentMatchMultiline + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -FileContentMatchMultilineExactly @@ -838,32 +1197,41 @@ As opposed to FileContentMatch and FileContentMatchExactly operators, FileConten When using FileContentMatchMultilineExactly operator, '^' and '$' represent the beginning and end of the whole file, instead of the beginning and end of a line. ```yaml -Type: SwitchParameter -Parameter Sets: FileContentMatchMultilineExactly -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FileContentMatchMultilineExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -HasArgumentCompleter -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: SwitchParameter -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 6 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -HaveCount @@ -871,15 +1239,20 @@ Accept wildcard characters: False Asserts that a collection has the expected amount of items. ```yaml -Type: SwitchParameter -Parameter Sets: HaveCount -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveCount + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -HaveParameter @@ -887,32 +1260,41 @@ Accept wildcard characters: False Asserts that a command has the expected parameter. ```yaml -Type: SwitchParameter -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -InParameterSet -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 5 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Invoke @@ -920,100 +1302,126 @@ Accept wildcard characters: False Checks if a Mocked command has been called a certain number of times and throws an exception if it has not. ```yaml -Type: SwitchParameter -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -InvokeVerifiable -Checks if any Verifiable Mock has not been invoked. -If so, this will throw an exception. +Checks if any Verifiable Mock has not been invoked. If so, this will throw an exception. ```yaml -Type: SwitchParameter -Parameter Sets: InvokeVerifiable -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: InvokeVerifiable + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Mandatory -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: SwitchParameter -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Match -Uses a regular expression to compare two objects. -This comparison is not case sensitive. +Uses a regular expression to compare two objects. This comparison is not case sensitive. ```yaml -Type: SwitchParameter -Parameter Sets: Match -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Match + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -MatchExactly -Uses a regular expression to compare two objects. -This comparison is case sensitive. +Uses a regular expression to compare two objects. This comparison is case sensitive. ```yaml -Type: SwitchParameter -Parameter Sets: MatchExactly -Aliases: CMATCH - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- CMATCH +ParameterSets: +- Name: MatchExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ModuleName -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 5 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Not @@ -1021,169 +1429,366 @@ Accept wildcard characters: False Reverse the assertion ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Be + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterThan + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessOrEqual + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeIn + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessThan + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterOrEqual + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLike + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLikeExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeNullOrEmpty + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeOfType + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeTrue + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeFalse + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Contain + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Exist + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatch + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchMultiline + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchMultilineExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: HaveCount + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: HaveParameter + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Match + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: MatchExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Throw + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: InvokeVerifiable + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Invoke + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ParameterFilter -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ParameterName -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -PassThru -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: SwitchParameter -Parameter Sets: Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Throw + Position: 5 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -RegularExpression -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Match, MatchExactly -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Match + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: MatchExactly + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Scope -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 6 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Throw -Checks if an exception was thrown. -Enclose input in a scriptblock. +Checks if an exception was thrown. Enclose input in a scriptblock. ```yaml -Type: SwitchParameter -Parameter Sets: Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Throw + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Times -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Type -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES ## RELATED LINKS -[https://pester.dev/docs/v5/commands/Should](https://pester.dev/docs/v5/commands/Should) - -[https://pester.dev/docs/v5/assertions](https://pester.dev/docs/v5/assertions) +- [https://pester.dev/docs/v5/commands/Should](https://pester.dev/docs/v5/commands/Should) +- [https://pester.dev/docs/v5/assertions](https://pester.dev/docs/v5/assertions) ## 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.0](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v5/commands/docusaurus.sidebar.js b/versioned_docs/version-v5/commands/docusaurus.sidebar.js index 5ea0b7dd..5f0ecc8f 100644 --- a/versioned_docs/version-v5/commands/docusaurus.sidebar.js +++ b/versioned_docs/version-v5/commands/docusaurus.sidebar.js @@ -1,7 +1,7 @@ /** * Import this file in your Docusaurus `sidebars.js` file. * - * Auto-generated by Alt3.Docusaurus.Powershell 1.0.37. + * Auto-generated by Alt3.Docusaurus.Powershell 2.0.0. * * Copyright (c) 2019-present, ALT3 B.V. * diff --git a/versioned_docs/version-v5/usage/configuration.mdx b/versioned_docs/version-v5/usage/configuration.mdx index 903c654e..ba8fbe58 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.0.* ### Run From c79ef53d572e6675f8f09beca76c249e9608027b Mon Sep 17 00:00:00 2001 From: fflaten <3436158+fflaten@users.noreply.github.com> Date: Sun, 26 Jul 2026 23:11:44 +0000 Subject: [PATCH 08/17] Update generated docs to 4.10.1 --- .../commands/Add-AssertionOperator.mdx | 168 +- .../version-v4/commands/AfterAll.mdx | 44 +- .../version-v4/commands/AfterEach.mdx | 46 +- .../version-v4/commands/AfterEachFeature.mdx | 91 +- .../version-v4/commands/AfterEachScenario.mdx | 91 +- .../version-v4/commands/Assert-MockCalled.mdx | 240 +-- .../commands/Assert-VerifiableMock.mdx | 22 +- .../commands/Assert-VerifiableMocks.mdx | 27 +- .../version-v4/commands/BeforeAll.mdx | 44 +- .../version-v4/commands/BeforeEach.mdx | 46 +- .../version-v4/commands/BeforeEachFeature.mdx | 91 +- .../commands/BeforeEachScenario.mdx | 91 +- .../version-v4/commands/Context.mdx | 129 +- .../version-v4/commands/Describe.mdx | 135 +- .../version-v4/commands/Find-GherkinStep.mdx | 73 +- .../commands/Get-ShouldOperator.mdx | 50 +- .../version-v4/commands/Get-TestDriveItem.mdx | 39 +- .../version-v4/commands/GherkinStep.mdx | 78 +- versioned_docs/version-v4/commands/In.mdx | 73 +- .../version-v4/commands/InModuleScope.mdx | 69 +- .../version-v4/commands/Invoke-Gherkin.mdx | 461 +++--- .../version-v4/commands/Invoke-Pester.mdx | 665 ++++---- versioned_docs/version-v4/commands/It.mdx | 202 ++- versioned_docs/version-v4/commands/Mock.mdx | 235 +-- .../version-v4/commands/New-Fixture.mdx | 88 +- .../version-v4/commands/New-MockObject.mdx | 42 +- .../version-v4/commands/New-PesterOption.mdx | 163 +- .../version-v4/commands/Set-ItResult.mdx | 137 +- .../commands/Set-TestInconclusive.mdx | 49 +- versioned_docs/version-v4/commands/Setup.mdx | 152 +- versioned_docs/version-v4/commands/Should.mdx | 1413 ++++++++++++----- .../version-v4/commands/docusaurus.sidebar.js | 2 +- 32 files changed, 3250 insertions(+), 2006 deletions(-) diff --git a/versioned_docs/version-v4/commands/Add-AssertionOperator.mdx b/versioned_docs/version-v4/commands/Add-AssertionOperator.mdx index 5462690e..d51df92f 100644 --- a/versioned_docs/version-v4/commands/Add-AssertionOperator.mdx +++ b/versioned_docs/version-v4/commands/Add-AssertionOperator.mdx @@ -1,12 +1,9 @@ --- -# Override id to have common docId for Commands navbar-link for all versions -id: Add-ShouldOperator -# Override slug so url matches v4 name -slug: Add-AssertionOperator +id: Add-AssertionOperator title: Add-AssertionOperator -description: Help page for the Powershell Pester "Add-AssertionOperator" command +description: Help for Pester command 'Add-AssertionOperator'. Register an Assertion Operator with Pester keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -15,6 +12,10 @@ 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 Register an Assertion Operator with Pester @@ -22,8 +23,8 @@ Register an Assertion Operator with Pester ## SYNTAX ```powershell -Add-AssertionOperator [-Name] [-Test] [[-Alias] ] [[-InternalName] ] - [-SupportsArrayInput] [] +Add-AssertionOperator [-Name] [-Test] [[-Alias] ] + [[-InternalName] ] [-SupportsArrayInput] ``` ## DESCRIPTION @@ -37,7 +38,6 @@ This function allows you to create custom Should assertions. ```powershell function BeAwesome($ActualValue, [switch] $Negate) { - [bool] $succeeded = $ActualValue -eq 'Awesome' if ($Negate) { $succeeded = -not $succeeded } @@ -69,92 +69,120 @@ PS C:\> "bad" | should -BeAwesome ## PARAMETERS -### -Name +### -Alias -The name of the assertion. -This will become a Named Parameter of Should. +A list of aliases for the Named Parameter. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Test +### -InternalName -The test function. -The function must return a PSObject with a [Bool]succeeded and a [string]failureMessage property. +If -Name is different from the actual function name, record the actual function name here. +Used by Get-ShouldOperator to pull function help. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Alias +### -Name -A list of aliases for the Named Parameter. +The name of the assertion. +This will become a Named Parameter of Should. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -InternalName +### -SupportsArrayInput -If -Name is different from the actual function name, record the actual function name here. -Used by Get-ShouldOperator to pull function help. +Does the test function support the passing an array of values to test. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -SupportsArrayInput +### -Test -Does the test function support the passing an array of values to test. +The test function. +The function must return a PSObject with a [Bool]succeeded and a [string]failureMessage property. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -164,6 +192,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/AfterAll.mdx b/versioned_docs/version-v4/commands/AfterAll.mdx index 8beb035e..c075145b 100644 --- a/versioned_docs/version-v4/commands/AfterAll.mdx +++ b/versioned_docs/version-v4/commands/AfterAll.mdx @@ -1,9 +1,9 @@ --- id: AfterAll title: AfterAll -description: Help page for the Powershell Pester "AfterAll" command +description: Help for Pester command 'AfterAll'. Defines a series of steps to perform at the end of the current Context or Describe block. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ 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 Defines a series of steps to perform at the end of the current Context @@ -20,7 +24,7 @@ or Describe block. ## SYNTAX ```powershell -AfterAll [-Scriptblock] [] +AfterAll [-Scriptblock] ``` ## DESCRIPTION @@ -46,20 +50,28 @@ PS C:\> {{ Add example code here }} the scriptblock to execute ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -69,8 +81,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/BeforeAll](https://pester.dev/docs/v4/commands/BeforeAll) +- [https://pester.dev/docs/commands/BeforeAll](https://pester.dev/docs/commands/BeforeAll) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/AfterEach.mdx b/versioned_docs/version-v4/commands/AfterEach.mdx index b9df474e..bb674291 100644 --- a/versioned_docs/version-v4/commands/AfterEach.mdx +++ b/versioned_docs/version-v4/commands/AfterEach.mdx @@ -1,9 +1,9 @@ --- id: AfterEach title: AfterEach -description: Help page for the Powershell Pester "AfterEach" command +description: Help for Pester command 'AfterEach'. Defines a series of steps to perform at the end of every It block within the current Context or Describe block. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ 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 Defines a series of steps to perform at the end of every It block within @@ -20,7 +24,7 @@ the current Context or Describe block. ## SYNTAX ```powershell -AfterEach [-Scriptblock] [] +AfterEach [-Scriptblock] ``` ## DESCRIPTION @@ -28,7 +32,7 @@ AfterEach [-Scriptblock] [] BeforeEach, AfterEach, BeforeAll, and AfterAll are unique in that they apply to the entire Context or Describe block, regardless of the order of the statements in the Context or Describe. -For a full description of this + For a full description of this behavior, as well as how multiple BeforeEach or AfterEach blocks interact with each other, please refer to the about_BeforeEach_AfterEach help file. @@ -49,20 +53,28 @@ PS C:\> {{ Add example code here }} the scriptblock to execute ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -72,8 +84,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/BeforeEach](https://pester.dev/docs/v4/commands/BeforeEach) +- [https://pester.dev/docs/commands/BeforeEach](https://pester.dev/docs/commands/BeforeEach) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/AfterEachFeature.mdx b/versioned_docs/version-v4/commands/AfterEachFeature.mdx index 589732f7..b7555744 100644 --- a/versioned_docs/version-v4/commands/AfterEachFeature.mdx +++ b/versioned_docs/version-v4/commands/AfterEachFeature.mdx @@ -1,9 +1,9 @@ --- id: AfterEachFeature title: AfterEachFeature -description: Help page for the Powershell Pester "AfterEachFeature" command +description: Help for Pester command 'AfterEachFeature'. Defines a ScriptBlock hook to run at the very end of a test run keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ 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 Defines a ScriptBlock hook to run at the very end of a test run @@ -21,13 +25,13 @@ Defines a ScriptBlock hook to run at the very end of a test run ### All (Default) ```powershell -AfterEachFeature [-Script] [] +AfterEachFeature [-Script] ``` ### Tags ```powershell -AfterEachFeature [-Tags] [-Script] [] +AfterEachFeature [-Tags] [-Script] ``` ## DESCRIPTION @@ -49,42 +53,61 @@ PS C:\> {{ Add example code here }} ## PARAMETERS -### -Tags +### -Script -Optional tags. -If set, this hook only runs for features with matching tags. +The ScriptBlock to run for the hook ```yaml -Type: String[] -Parameter Sets: Tags -Aliases: - -Required: True -Position: 1 -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: All + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Tags + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Script +### -Tags -The ScriptBlock to run for the hook +Optional tags. +If set, this hook only runs for features with matching tags. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Tags + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -94,12 +117,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/BeforeEachFeature](https://pester.dev/docs/v4/commands/BeforeEachFeature) - -[https://pester.dev/docs/v4/commands/BeforeEachScenario](https://pester.dev/docs/v4/commands/BeforeEachScenario) - -[https://pester.dev/docs/v4/commands/AfterEachScenario](https://pester.dev/docs/v4/commands/AfterEachScenario) +- [https://pester.dev/docs/commands/BeforeEachFeature](https://pester.dev/docs/commands/BeforeEachFeature) +- [https://pester.dev/docs/commands/BeforeEachScenario](https://pester.dev/docs/commands/BeforeEachScenario) +- [https://pester.dev/docs/commands/AfterEachScenario](https://pester.dev/docs/commands/AfterEachScenario) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/AfterEachScenario.mdx b/versioned_docs/version-v4/commands/AfterEachScenario.mdx index ef27578a..9d57f1c7 100644 --- a/versioned_docs/version-v4/commands/AfterEachScenario.mdx +++ b/versioned_docs/version-v4/commands/AfterEachScenario.mdx @@ -1,9 +1,9 @@ --- id: AfterEachScenario title: AfterEachScenario -description: Help page for the Powershell Pester "AfterEachScenario" command +description: Help for Pester command 'AfterEachScenario'. Defines a ScriptBlock hook to run after each scenario to set up the test environment keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ 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 Defines a ScriptBlock hook to run after each scenario to set up the test environment @@ -21,13 +25,13 @@ Defines a ScriptBlock hook to run after each scenario to set up the test environ ### All (Default) ```powershell -AfterEachScenario [-Script] [] +AfterEachScenario [-Script] ``` ### Tags ```powershell -AfterEachScenario [-Tags] [-Script] [] +AfterEachScenario [-Tags] [-Script] ``` ## DESCRIPTION @@ -49,42 +53,61 @@ PS C:\> {{ Add example code here }} ## PARAMETERS -### -Tags +### -Script -Optional tags. -If set, this hook only runs for features with matching tags +The ScriptBlock to run for the hook ```yaml -Type: String[] -Parameter Sets: Tags -Aliases: - -Required: True -Position: 1 -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: All + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Tags + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Script +### -Tags -The ScriptBlock to run for the hook +Optional tags. +If set, this hook only runs for features with matching tags ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Tags + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -94,12 +117,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/BeforeEachScenario](https://pester.dev/docs/v4/commands/BeforeEachScenario) - -[https://pester.dev/docs/v4/commands/BeforeEachFeature](https://pester.dev/docs/v4/commands/BeforeEachFeature) - -[https://pester.dev/docs/v4/commands/AfterEachFeature](https://pester.dev/docs/v4/commands/AfterEachFeature) +- [https://pester.dev/docs/commands/BeforeEachScenario](https://pester.dev/docs/commands/BeforeEachScenario) +- [https://pester.dev/docs/commands/BeforeEachFeature](https://pester.dev/docs/commands/BeforeEachFeature) +- [https://pester.dev/docs/commands/AfterEachFeature](https://pester.dev/docs/commands/AfterEachFeature) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/Assert-MockCalled.mdx b/versioned_docs/version-v4/commands/Assert-MockCalled.mdx index 04062211..18596832 100644 --- a/versioned_docs/version-v4/commands/Assert-MockCalled.mdx +++ b/versioned_docs/version-v4/commands/Assert-MockCalled.mdx @@ -1,9 +1,9 @@ --- id: Assert-MockCalled title: Assert-MockCalled -description: Help page for the Powershell Pester "Assert-MockCalled" command +description: Help for Pester command 'Assert-MockCalled'. Checks if a Mocked command has been called a certain number of times and throws an exception if it has not. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ 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 Checks if a Mocked command has been called a certain number of times @@ -22,22 +26,22 @@ and throws an exception if it has not. ### ParameterFilter (Default) ```powershell -Assert-MockCalled [-CommandName] [[-Times] ] [[-ParameterFilter] ] - [[-ModuleName] ] [[-Scope] ] [-Exactly] [] +Assert-MockCalled [-CommandName] [[-Times] ] [[-ParameterFilter] ] + [[-ModuleName] ] [[-Scope] ] [-Exactly] ``` ### ExclusiveFilter ```powershell -Assert-MockCalled [-CommandName] [[-Times] ] -ExclusiveFilter - [[-ModuleName] ] [[-Scope] ] [-Exactly] [] +Assert-MockCalled [-CommandName] [[-Times] ] [[-ModuleName] ] + [[-Scope] ] -ExclusiveFilter [-Exactly] ``` ## DESCRIPTION This command verifies that a mocked command has been called a certain number of times. -If the call history of the mocked command does not match the parameters + If the call history of the mocked command does not match the parameters passed to Assert-MockCalled, Assert-MockCalled will throw an exception. ## EXAMPLES @@ -117,7 +121,7 @@ Checks for calls only within the current It block. Describe 'Describe' { Mock -ModuleName SomeModule Set-Content { } - {... +{... Some Code ...} It 'Calls Set-Content at least once in the Describe block' { @@ -127,7 +131,7 @@ Some Code ...} ``` Checks for calls to the mock within the SomeModule module. -Note that both the Mock + Note that both the Mock and Assert-MockCalled commands use the same module name. ### EXAMPLE 7 @@ -147,51 +151,46 @@ the -Path parameter set to any other value. The mocked command whose call history should be checked. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Times - -The number of times that the mock must be called to avoid an exception -from throwing. - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: 1 -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ParameterFilter +### -Exactly -An optional filter to qualify which calls should be counted. -Only those -calls to the mock whose parameters cause this filter to return true -will be counted. +If this switch is present, the number specified in Times must match +exactly the number of times the mock has been called. +Otherwise it +must match "at least" the number of times specified. + If the value +passed to the Times parameter is zero, the Exactly switch is implied. ```yaml -Type: ScriptBlock -Parameter Sets: ParameterFilter -Aliases: - -Required: False -Position: 3 -Default value: { $True } -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExclusiveFilter @@ -199,40 +198,74 @@ Accept wildcard characters: False Like ParameterFilter, except when you use ExclusiveFilter, and there were any calls to the mocked command which do not match the filter, an exception will be thrown. -This is a convenient way to avoid needing + This is a convenient way to avoid needing to have two calls to Assert-MockCalled like this: Assert-MockCalled SomeCommand -Times 1 -ParameterFilter \{ $something -eq $true \} Assert-MockCalled SomeCommand -Times 0 -ParameterFilter \{ $something -ne $true \} ```yaml -Type: ScriptBlock -Parameter Sets: ExclusiveFilter -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: ExclusiveFilter + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ModuleName The module where the mock being checked was injected. -This is optional, + This is optional, and must match the ModuleName that was used when setting up the Mock. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -ParameterFilter + +An optional filter to qualify which calls should be counted. +Only those +calls to the mock whose parameters cause this filter to return true +will be counted. + +```yaml +Type: System.Management.Automation.ScriptBlock +DefaultValue: '{ $True }' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: ParameterFilter + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Scope @@ -258,41 +291,50 @@ all calls to the mocked command in the current Feature / Scenario block, as well as all child scopes of that block. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 5 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Exactly +### -Times -If this switch is present, the number specified in Times must match -exactly the number of times the mock has been called. -Otherwise it -must match "at least" the number of times specified. -If the value -passed to the Times parameter is zero, the Exactly switch is implied. +The number of times that the mock must be called to avoid an exception +from throwing. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Int32 +DefaultValue: 1 +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -302,9 +344,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable The parameter filter passed to Assert-MockCalled does not necessarily have to match the parameter filter (if any) which was used to create the Mock. -Assert-MockCalled will find any entry in the command history + Assert-MockCalled will find any entry in the command history which matches its parameter filter, regardless of how the Mock was created. -However, if any calls to the + However, if any calls to the mocked command are made which did not match any mock's parameter filter (resulting in the original command being executed instead of a mock), these calls to the original command are not tracked in the call history. In other words, Assert-MockCalled can only be used to check for calls to the mocked implementation, not @@ -312,6 +354,6 @@ to the original. ## RELATED LINKS -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/Assert-VerifiableMock.mdx b/versioned_docs/version-v4/commands/Assert-VerifiableMock.mdx index 7730d001..3728175d 100644 --- a/versioned_docs/version-v4/commands/Assert-VerifiableMock.mdx +++ b/versioned_docs/version-v4/commands/Assert-VerifiableMock.mdx @@ -1,9 +1,9 @@ --- id: Assert-VerifiableMock title: Assert-VerifiableMock -description: Help page for the Powershell Pester "Assert-VerifiableMock" command +description: Help for Pester command 'Assert-VerifiableMock'. Checks if any Verifiable Mock has not been invoked. If so, this will throw an exception. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,15 +12,18 @@ 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 -Checks if any Verifiable Mock has not been invoked. -If so, this will throw an exception. +Checks if any Verifiable Mock has not been invoked. If so, this will throw an exception. ## SYNTAX ```powershell -Assert-VerifiableMock [] +Assert-VerifiableMock ``` ## DESCRIPTION @@ -66,7 +69,10 @@ This will not throw an exception because the mock was invoked. ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -76,6 +82,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/Assert-VerifiableMocks.mdx b/versioned_docs/version-v4/commands/Assert-VerifiableMocks.mdx index 77388e7a..2149902a 100644 --- a/versioned_docs/version-v4/commands/Assert-VerifiableMocks.mdx +++ b/versioned_docs/version-v4/commands/Assert-VerifiableMocks.mdx @@ -1,9 +1,9 @@ --- id: Assert-VerifiableMocks title: Assert-VerifiableMocks -description: Help page for the Powershell Pester "Assert-VerifiableMocks" command +description: Help for Pester command 'Assert-VerifiableMocks'. The function is for backward compatibility only. Please update your code and use 'Assert-VerifiableMock' instead. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,15 +12,18 @@ 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 -The function is for backward compatibility only. -Please update your code and use 'Assert-VerifiableMock' instead. +The function is for backward compatibility only. Please update your code and use 'Assert-VerifiableMock' instead. ## SYNTAX ```powershell -Assert-VerifiableMocks [] +Assert-VerifiableMocks ``` ## DESCRIPTION @@ -43,7 +46,10 @@ PS C:\> {{ Add example code here }} ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -53,10 +59,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/migrations/v3-to-v4](https://pester.dev/docs/v4/migrations/v3-to-v4) - -[https://github.com/pester/Pester/issues/880](https://github.com/pester/Pester/issues/880) +- [https://pester.dev/docs/migrations/v3-to-v4](https://pester.dev/docs/migrations/v3-to-v4) +- [https://github.com/pester/Pester/issues/880](https://github.com/pester/Pester/issues/880) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/BeforeAll.mdx b/versioned_docs/version-v4/commands/BeforeAll.mdx index 217c02a7..b6d85e81 100644 --- a/versioned_docs/version-v4/commands/BeforeAll.mdx +++ b/versioned_docs/version-v4/commands/BeforeAll.mdx @@ -1,9 +1,9 @@ --- id: BeforeAll title: BeforeAll -description: Help page for the Powershell Pester "BeforeAll" command +description: Help for Pester command 'BeforeAll'. Defines a series of steps to perform at the beginning of the current Context or Describe block. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ 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 Defines a series of steps to perform at the beginning of the current Context @@ -20,7 +24,7 @@ or Describe block. ## SYNTAX ```powershell -BeforeAll [-Scriptblock] [] +BeforeAll [-Scriptblock] ``` ## DESCRIPTION @@ -46,20 +50,28 @@ PS C:\> {{ Add example code here }} the scriptblock to execute ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -69,8 +81,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/AfterAll](https://pester.dev/docs/v4/commands/AfterAll) +- [https://pester.dev/docs/commands/AfterAll](https://pester.dev/docs/commands/AfterAll) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/BeforeEach.mdx b/versioned_docs/version-v4/commands/BeforeEach.mdx index a370a968..ce801fa8 100644 --- a/versioned_docs/version-v4/commands/BeforeEach.mdx +++ b/versioned_docs/version-v4/commands/BeforeEach.mdx @@ -1,9 +1,9 @@ --- id: BeforeEach title: BeforeEach -description: Help page for the Powershell Pester "BeforeEach" command +description: Help for Pester command 'BeforeEach'. Defines a series of steps to perform at the beginning of every It block within the current Context or Describe block. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ 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 Defines a series of steps to perform at the beginning of every It block within @@ -20,7 +24,7 @@ the current Context or Describe block. ## SYNTAX ```powershell -BeforeEach [-Scriptblock] [] +BeforeEach [-Scriptblock] ``` ## DESCRIPTION @@ -28,7 +32,7 @@ BeforeEach [-Scriptblock] [] BeforeEach, AfterEach, BeforeAll, and AfterAll are unique in that they apply to the entire Context or Describe block, regardless of the order of the statements in the Context or Describe. -For a full description of this + For a full description of this behavior, as well as how multiple BeforeEach or AfterEach blocks interact with each other, please refer to the about_BeforeEach_AfterEach help file. @@ -49,20 +53,28 @@ PS C:\> {{ Add example code here }} the scriptblock to execute ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -72,8 +84,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/AfterEach](https://pester.dev/docs/v4/commands/AfterEach) +- [https://pester.dev/docs/commands/AfterEach](https://pester.dev/docs/commands/AfterEach) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/BeforeEachFeature.mdx b/versioned_docs/version-v4/commands/BeforeEachFeature.mdx index f32c7e97..cfc8b915 100644 --- a/versioned_docs/version-v4/commands/BeforeEachFeature.mdx +++ b/versioned_docs/version-v4/commands/BeforeEachFeature.mdx @@ -1,9 +1,9 @@ --- id: BeforeEachFeature title: BeforeEachFeature -description: Help page for the Powershell Pester "BeforeEachFeature" command +description: Help for Pester command 'BeforeEachFeature'. Defines a ScriptBlock hook to run before each feature to set up the test environment keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ 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 Defines a ScriptBlock hook to run before each feature to set up the test environment @@ -21,13 +25,13 @@ Defines a ScriptBlock hook to run before each feature to set up the test environ ### All (Default) ```powershell -BeforeEachFeature [-Script] [] +BeforeEachFeature [-Script] ``` ### Tags ```powershell -BeforeEachFeature [-Tags] [-Script] [] +BeforeEachFeature [-Tags] [-Script] ``` ## DESCRIPTION @@ -49,42 +53,61 @@ PS C:\> {{ Add example code here }} ## PARAMETERS -### -Tags +### -Script -Optional tags. -If set, this hook only runs for features with matching tags +The ScriptBlock to run for the hook ```yaml -Type: String[] -Parameter Sets: Tags -Aliases: - -Required: True -Position: 1 -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: All + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Tags + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Script +### -Tags -The ScriptBlock to run for the hook +Optional tags. +If set, this hook only runs for features with matching tags ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Tags + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -94,12 +117,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/AfterEachFeature](https://pester.dev/docs/v4/commands/AfterEachFeature) - -[https://pester.dev/docs/v4/commands/BeforeEachScenario](https://pester.dev/docs/v4/commands/BeforeEachScenario) - -[https://pester.dev/docs/v4/commands/AfterEachScenario](https://pester.dev/docs/v4/commands/AfterEachScenario) +- [https://pester.dev/docs/commands/AfterEachFeature](https://pester.dev/docs/commands/AfterEachFeature) +- [https://pester.dev/docs/commands/BeforeEachScenario](https://pester.dev/docs/commands/BeforeEachScenario) +- [https://pester.dev/docs/commands/AfterEachScenario](https://pester.dev/docs/commands/AfterEachScenario) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/BeforeEachScenario.mdx b/versioned_docs/version-v4/commands/BeforeEachScenario.mdx index ac56b906..3fa14fab 100644 --- a/versioned_docs/version-v4/commands/BeforeEachScenario.mdx +++ b/versioned_docs/version-v4/commands/BeforeEachScenario.mdx @@ -1,9 +1,9 @@ --- id: BeforeEachScenario title: BeforeEachScenario -description: Help page for the Powershell Pester "BeforeEachScenario" command +description: Help for Pester command 'BeforeEachScenario'. Defines a ScriptBlock hook to run before each scenario to set up the test environment keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ 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 Defines a ScriptBlock hook to run before each scenario to set up the test environment @@ -21,13 +25,13 @@ Defines a ScriptBlock hook to run before each scenario to set up the test enviro ### All (Default) ```powershell -BeforeEachScenario [-Script] [] +BeforeEachScenario [-Script] ``` ### Tags ```powershell -BeforeEachScenario [-Tags] [-Script] [] +BeforeEachScenario [-Tags] [-Script] ``` ## DESCRIPTION @@ -51,42 +55,61 @@ PS C:\> {{ Add example code here }} ## PARAMETERS -### -Tags +### -Script -Optional tags. -If set, this hook only runs for features with matching tags +The ScriptBlock to run for the hook ```yaml -Type: String[] -Parameter Sets: Tags -Aliases: - -Required: True -Position: 1 -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: All + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Tags + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Script +### -Tags -The ScriptBlock to run for the hook +Optional tags. +If set, this hook only runs for features with matching tags ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Tags + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -96,12 +119,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/AfterEachScenario](https://pester.dev/docs/v4/commands/AfterEachScenario) - -[https://pester.dev/docs/v4/commands/BeforeEachFeature](https://pester.dev/docs/v4/commands/BeforeEachFeature) - -[https://pester.dev/docs/v4/commands/AfterEachFeature](https://pester.dev/docs/v4/commands/AfterEachFeature) +- [https://pester.dev/docs/commands/AfterEachScenario](https://pester.dev/docs/commands/AfterEachScenario) +- [https://pester.dev/docs/commands/BeforeEachFeature](https://pester.dev/docs/commands/BeforeEachFeature) +- [https://pester.dev/docs/commands/AfterEachFeature](https://pester.dev/docs/commands/AfterEachFeature) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/Context.mdx b/versioned_docs/version-v4/commands/Context.mdx index 8fae6305..937176c0 100644 --- a/versioned_docs/version-v4/commands/Context.mdx +++ b/versioned_docs/version-v4/commands/Context.mdx @@ -1,9 +1,9 @@ --- id: Context title: Context -description: Help page for the Powershell Pester "Context" command +description: Help for Pester command 'Context'. Provides logical grouping of It blocks within a single Describe block. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ 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 Provides logical grouping of It blocks within a single Describe block. @@ -19,7 +23,7 @@ Provides logical grouping of It blocks within a single Describe block. ## SYNTAX ```powershell -Context [-Name] [-Tag ] [[-Fixture] ] [] +Context [-Name] [[-Fixture] ] [-Tag ] ``` ## DESCRIPTION @@ -38,11 +42,9 @@ apply to tests within that Context . ```powershell function Add-Numbers($a, $b) { return $a + $b - } Describe "Add-Numbers" { - Context "when root does not exist" { It "..." { ... } @@ -61,63 +63,82 @@ Describe "Add-Numbers" { ## PARAMETERS +### -Fixture + +Script that is executed. +This may include setup specific to the context +and one or more It blocks that validate the expected outcomes. + +```yaml +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + ### -Name The name of the Context. This is a phrase describing a set of tests within a describe. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Tag Optional parameter containing an array of strings. -When calling Invoke-Pester, + When calling Invoke-Pester, it is possible to specify a -Tag parameter which will only execute Context blocks containing the same Tag. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: Tags - -Required: False -Position: Named -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Fixture - -Script that is executed. -This may include setup specific to the context -and one or more It blocks that validate the expected outcomes. - -```yaml -Type: ScriptBlock -Parameter Sets: (All) +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +- Tags +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -127,20 +148,14 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/Describe](https://pester.dev/docs/v4/commands/Describe) - -[https://pester.dev/docs/v4/commands/It](https://pester.dev/docs/v4/commands/It) - -[https://pester.dev/docs/v4/commands/BeforeEach](https://pester.dev/docs/v4/commands/BeforeEach) - -[https://pester.dev/docs/v4/commands/AfterEach](https://pester.dev/docs/v4/commands/AfterEach) - -[https://pester.dev/docs/v4/commands/Should](https://pester.dev/docs/v4/commands/Should) - -[https://pester.dev/docs/v4/usage/mocking](https://pester.dev/docs/v4/usage/mocking) - -[https://pester.dev/docs/v4/usage/testdrive](https://pester.dev/docs/v4/usage/testdrive) +- [https://pester.dev/docs/commands/Describe](https://pester.dev/docs/commands/Describe) +- [https://pester.dev/docs/commands/It](https://pester.dev/docs/commands/It) +- [https://pester.dev/docs/commands/BeforeEach](https://pester.dev/docs/commands/BeforeEach) +- [https://pester.dev/docs/commands/AfterEach](https://pester.dev/docs/commands/AfterEach) +- [https://pester.dev/docs/commands/Should](https://pester.dev/docs/commands/Should) +- [https://pester.dev/docs/usage/mocking](https://pester.dev/docs/usage/mocking) +- [https://pester.dev/docs/usage/testdrive](https://pester.dev/docs/usage/testdrive) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/Describe.mdx b/versioned_docs/version-v4/commands/Describe.mdx index af5e4564..494fba8f 100644 --- a/versioned_docs/version-v4/commands/Describe.mdx +++ b/versioned_docs/version-v4/commands/Describe.mdx @@ -1,9 +1,9 @@ --- id: Describe title: Describe -description: Help page for the Powershell Pester "Describe" command +description: Help for Pester command 'Describe'. Creates a logical group of tests. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ 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 a logical group of tests. @@ -19,7 +23,7 @@ Creates a logical group of tests. ## SYNTAX ```powershell -Describe [-Name] [-Tag ] [[-Fixture] ] [] +Describe [-Name] [[-Fixture] ] [-Tag ] ``` ## DESCRIPTION @@ -28,7 +32,7 @@ Creates a logical group of tests. All Mocks, TestDrive and TestRegistry contents defined within a Describe block are scoped to that Describe; they will no longer be present when the Describe block exits. -A Describe + A Describe block may contain any number of Context and It blocks. ## EXAMPLES @@ -38,7 +42,6 @@ block may contain any number of Context and It blocks. ```powershell function Add-Numbers($a, $b) { return $a + $b - } Describe "Add-Numbers" { @@ -66,6 +69,33 @@ Describe "Add-Numbers" { ## PARAMETERS +### -Fixture + +The actual test script. +If you are following the AAA pattern (Arrange-Act-Assert), +this typically holds the arrange and act sections. +The Asserts will also lie +in this block but are typically nested each in its own It block. +Assertions are +typically performed by the Should command within the It blocks. + +```yaml +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + ### -Name The name of the test group. @@ -73,61 +103,53 @@ This is often an expressive phrase describing the scenario being tested. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Tag Optional parameter containing an array of strings. -When calling Invoke-Pester, + When calling Invoke-Pester, it is possible to specify a -Tag parameter which will only execute Describe blocks containing the same Tag. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: Tags - -Required: False -Position: Named -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Fixture - -The actual test script. -If you are following the AAA pattern (Arrange-Act-Assert), -this typically holds the arrange and act sections. -The Asserts will also lie -in this block but are typically nested each in its own It block. -Assertions are -typically performed by the Should command within the It blocks. - -```yaml -Type: ScriptBlock -Parameter Sets: (All) +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +- Tags +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -137,18 +159,13 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/It](https://pester.dev/docs/v4/commands/It) - -[https://pester.dev/docs/v4/commands/Context](https://pester.dev/docs/v4/commands/Context) - -[https://pester.dev/docs/v4/commands/Invoke-Pester](https://pester.dev/docs/v4/commands/Invoke-Pester) - -[https://pester.dev/docs/v4/commands/Should](https://pester.dev/docs/v4/commands/Should) - -[https://pester.dev/docs/v4/usage/mocking](https://pester.dev/docs/v4/usage/mocking) - -[https://pester.dev/docs/v4/usage/testdrive](https://pester.dev/docs/v4/usage/testdrive) +- [https://pester.dev/docs/commands/It](https://pester.dev/docs/commands/It) +- [https://pester.dev/docs/commands/Context](https://pester.dev/docs/commands/Context) +- [https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) +- [https://pester.dev/docs/commands/Should](https://pester.dev/docs/commands/Should) +- [https://pester.dev/docs/usage/mocking](https://pester.dev/docs/usage/mocking) +- [https://pester.dev/docs/usage/testdrive](https://pester.dev/docs/usage/testdrive) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/Find-GherkinStep.mdx b/versioned_docs/version-v4/commands/Find-GherkinStep.mdx index 8928971d..c71afae0 100644 --- a/versioned_docs/version-v4/commands/Find-GherkinStep.mdx +++ b/versioned_docs/version-v4/commands/Find-GherkinStep.mdx @@ -1,9 +1,9 @@ --- id: Find-GherkinStep title: Find-GherkinStep -description: Help page for the Powershell Pester "Find-GherkinStep" command +description: Help for Pester command 'Find-GherkinStep'. Find a step implmentation that matches a given step keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ 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 Find a step implmentation that matches a given step @@ -19,7 +23,7 @@ Find a step implmentation that matches a given step ## SYNTAX ```powershell -Find-GherkinStep [[-Step] ] [[-BasePath] ] [] +Find-GherkinStep [[-Step] ] [[-BasePath] ] ``` ## DESCRIPTION @@ -41,41 +45,54 @@ And the module is imported .\module.Steps.ps1: line 39 ... ## PARAMETERS -### -Step +### -BasePath -The text from feature file +The path to search for step implementations. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: $Pwd +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -BasePath +### -Step -The path to search for step implementations. +The text from feature file ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: $Pwd -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -85,6 +102,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/Get-ShouldOperator.mdx b/versioned_docs/version-v4/commands/Get-ShouldOperator.mdx index f65f77d5..282189aa 100644 --- a/versioned_docs/version-v4/commands/Get-ShouldOperator.mdx +++ b/versioned_docs/version-v4/commands/Get-ShouldOperator.mdx @@ -1,9 +1,9 @@ --- id: Get-ShouldOperator title: Get-ShouldOperator -description: Help page for the Powershell Pester "Get-ShouldOperator" command +description: Help for Pester command 'Get-ShouldOperator'. Display the assertion operators available for use with Should. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ 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 Display the assertion operators available for use with Should. @@ -19,7 +23,7 @@ Display the assertion operators available for use with Should. ## SYNTAX ```powershell -Get-ShouldOperator [-Name ] [] +Get-ShouldOperator [-Name ] ``` ## DESCRIPTION @@ -36,18 +40,16 @@ including any registered by the user with Add-AssertionOperator. ```powershell Get-ShouldOperator -``` - Return all available Should assertion operators and their aliases. +``` ### EXAMPLE 2 ```powershell Get-ShouldOperator -Name Be -``` - Return help examples for the Be assertion operator. -Name is a dynamic parameter that tab completes all available options. +``` ## PARAMETERS @@ -56,20 +58,28 @@ Return help examples for the Be assertion operator. \{\{ Fill Name Description \}\} ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -84,8 +94,8 @@ standard PowerShell discovery patterns (like `Get-Help Should -Parameter *`). ## RELATED LINKS -[https://pester.dev/docs/v4/commands/Should](https://pester.dev/docs/v4/commands/Should) +- [https://pester.dev/docs/commands/Should](https://pester.dev/docs/commands/Should) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/Get-TestDriveItem.mdx b/versioned_docs/version-v4/commands/Get-TestDriveItem.mdx index 98f29c28..294e9f6c 100644 --- a/versioned_docs/version-v4/commands/Get-TestDriveItem.mdx +++ b/versioned_docs/version-v4/commands/Get-TestDriveItem.mdx @@ -1,9 +1,9 @@ --- id: Get-TestDriveItem title: Get-TestDriveItem -description: Help page for the Powershell Pester "Get-TestDriveItem" command +description: Help for Pester command 'Get-TestDriveItem'. The Get-TestDriveItem cmdlet gets the item in Pester test drive. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ 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 The Get-TestDriveItem cmdlet gets the item in Pester test drive. @@ -19,7 +23,7 @@ The Get-TestDriveItem cmdlet gets the item in Pester test drive. ## SYNTAX ```powershell -Get-TestDriveItem [[-Path] ] +Get-TestDriveItem [[-Path] ] ``` ## DESCRIPTION @@ -55,15 +59,20 @@ Wildcards are permitted. This parameter is required, but the parameter name ("Path") is optional. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ## INPUTS @@ -74,8 +83,8 @@ Accept wildcard characters: False ## RELATED LINKS -[https://pester.dev/docs/v4/usage/testdrive](https://pester.dev/docs/v4/usage/testdrive) +- [https://pester.dev/docs/usage/testdrive](https://pester.dev/docs/usage/testdrive) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/GherkinStep.mdx b/versioned_docs/version-v4/commands/GherkinStep.mdx index 11090115..af11f6fc 100644 --- a/versioned_docs/version-v4/commands/GherkinStep.mdx +++ b/versioned_docs/version-v4/commands/GherkinStep.mdx @@ -1,9 +1,9 @@ --- id: GherkinStep title: GherkinStep -description: Help page for the Powershell Pester "GherkinStep" command +description: Help for Pester command 'GherkinStep'. A step in a test, also known as a Given, When, or Then keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ 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 A step in a test, also known as a Given, When, or Then @@ -19,7 +23,7 @@ A step in a test, also known as a Given, When, or Then ## SYNTAX ```powershell -GherkinStep [-Name] [-Test] [] +GherkinStep [-Name] [-Test] ``` ## DESCRIPTION @@ -42,15 +46,15 @@ executed in a manner that is similar to unit tests. Given 'we have a destination folder' { mkdir testdrive:\target -ErrorAction SilentlyContinue - 'testdrive:\target' | Should -Exist + 'testdrive:\target' | Should Exist } When 'we call Copy-Item' { - { Copy-Item testdrive:\source\something.txt testdrive:\target } | Should -Not -Throw + { Copy-Item testdrive:\source\something.txt testdrive:\target } | Should Not Throw } Then 'we have a new file in the destination' { - 'testdrive:\target\something.txt' | Should -Exist + 'testdrive:\target\something.txt' | Should Exist } # Steps need to allign with feature specifications in a *.feature file @@ -70,14 +74,13 @@ Scenario: The file exists, and the target folder exists ```powershell # This example shows a complex regex match that can be used for multiple lines in the feature specification - # The named match is mapped to the script parameter # filename: namedregex.Step.ps1 -Given 'we have a (?\\S*) function' { +Given 'we have a (?\S*) function' { param($name) - "$psscriptroot\..\MyModule\*\$name.ps1" | Should -Exist + "$psscriptroot\..\MyModule\*\$name.ps1" | Should Exist } # filename: namedregex.feature @@ -98,15 +101,20 @@ The name of a gherkin step is actually a regular expression, from which capturin are cast and passed to the parameters in the ScriptBlock ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Test @@ -116,20 +124,28 @@ May accept parameters from regular expression capturing groups (named or not), or from tables or multiline strings. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -139,8 +155,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://sites.google.com/site/unclebobconsultingllc/the-truth-about-bdd](https://sites.google.com/site/unclebobconsultingllc/the-truth-about-bdd) +- [https://sites.google.com/site/unclebobconsultingllc/the-truth-about-bdd](https://sites.google.com/site/unclebobconsultingllc/the-truth-about-bdd) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/In.mdx b/versioned_docs/version-v4/commands/In.mdx index 5de4ee8a..f66978e2 100644 --- a/versioned_docs/version-v4/commands/In.mdx +++ b/versioned_docs/version-v4/commands/In.mdx @@ -1,9 +1,9 @@ --- id: In title: In -description: Help page for the Powershell Pester "In" command +description: Help for Pester command 'In'. A convenience function that executes a script from a specified path. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ 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 A convenience function that executes a script from a specified path. @@ -19,7 +23,7 @@ A convenience function that executes a script from a specified path. ## SYNTAX ```powershell -In [[-path] ] [[-execute] ] [] +In [[-path] ] [[-execute] ] ``` ## DESCRIPTION @@ -42,41 +46,54 @@ PS C:\> {{ Add example code here }} ## PARAMETERS -### -path +### -execute -The path that the execute block will be executed in. +The script to be executed in the path provided. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -execute +### -path -The script to be executed in the path provided. +The path that the execute block will be executed in. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -86,6 +103,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/InModuleScope.mdx b/versioned_docs/version-v4/commands/InModuleScope.mdx index e9444552..b805538e 100644 --- a/versioned_docs/version-v4/commands/InModuleScope.mdx +++ b/versioned_docs/version-v4/commands/InModuleScope.mdx @@ -1,9 +1,9 @@ --- id: InModuleScope title: InModuleScope -description: Help page for the Powershell Pester "InModuleScope" command +description: Help for Pester command 'InModuleScope'. Allows you to execute parts of a test script within the scope of a PowerShell script module. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ 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 Allows you to execute parts of a test script within the @@ -20,7 +24,7 @@ scope of a PowerShell script module. ## SYNTAX ```powershell -InModuleScope [-ModuleName] [-ScriptBlock] [] +InModuleScope [-ModuleName] [-ScriptBlock] ``` ## DESCRIPTION @@ -39,11 +43,9 @@ either inside or outside a Describe block. ```powershell # The script module: - function PublicFunction { # Does something - } function PrivateFunction @@ -69,7 +71,7 @@ InModuleScope MyModule { Normally you would not be able to access "PrivateFunction" from the PowerShell session, because the module only exported "PublicFunction". -Using InModuleScope allowed this call to + Using InModuleScope allowed this call to "PrivateFunction" to work successfully. ## PARAMETERS @@ -82,15 +84,20 @@ This module must already be loaded into the current PowerShell session. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ScriptBlock @@ -98,20 +105,28 @@ Accept wildcard characters: False The code to be executed within the script module. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -121,6 +136,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/Invoke-Gherkin.mdx b/versioned_docs/version-v4/commands/Invoke-Gherkin.mdx index 6d496492..02e58ad6 100644 --- a/versioned_docs/version-v4/commands/Invoke-Gherkin.mdx +++ b/versioned_docs/version-v4/commands/Invoke-Gherkin.mdx @@ -1,9 +1,9 @@ --- id: Invoke-Gherkin title: Invoke-Gherkin -description: Help page for the Powershell Pester "Invoke-Gherkin" command +description: Help for Pester command 'Invoke-Gherkin'. Invokes Pester to run all tests defined in .feature files keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ 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 Invokes Pester to run all tests defined in .feature files @@ -21,17 +25,17 @@ Invokes Pester to run all tests defined in .feature files ### Default (Default) ```powershell -Invoke-Gherkin [[-Path] ] [[-ScenarioName] ] [-EnableExit] [[-Tag] ] - [-ExcludeTag ] [-CodeCoverage ] [-Strict] [-OutputFile ] [-OutputFormat ] - [-Quiet] [-PesterOption ] [-Show ] [-PassThru] [] +Invoke-Gherkin [[-Path] ] [[-ScenarioName] ] [-EnableExit] [[-Tag] ] + [-ExcludeTag ] [-CodeCoverage ] [-Strict] [-OutputFile ] + [-OutputFormat ] [-Quiet] [-PesterOption ] [-Show ] [-PassThru] ``` ### RetestFailed ```powershell -Invoke-Gherkin [-FailedLast] [[-Path] ] [[-ScenarioName] ] [-EnableExit] [[-Tag] ] - [-ExcludeTag ] [-CodeCoverage ] [-Strict] [-OutputFile ] [-OutputFormat ] - [-Quiet] [-PesterOption ] [-Show ] [-PassThru] [] +Invoke-Gherkin [[-Path] ] [[-ScenarioName] ] [-EnableExit] [[-Tag] ] + -FailedLast [-ExcludeTag ] [-CodeCoverage ] [-Strict] [-OutputFile ] + [-OutputFormat ] [-Quiet] [-PesterOption ] [-Show ] [-PassThru] ``` ## DESCRIPTION @@ -105,56 +109,38 @@ Runs all *.feature specifications in the current directory, and generates a cove ## PARAMETERS -### -FailedLast - -Rerun only the scenarios which failed last time - -```yaml -Type: SwitchParameter -Parameter Sets: RetestFailed -Aliases: - -Required: True -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Path - -This parameter indicates which feature files should be tested. +### -CodeCoverage -Aliased to 'Script' for compatibility with Pester, but does not support hashtables, since feature files don't take parameters. +Instructs Pester to generate a code coverage report in addition to running tests. + You may pass either hashtables or strings to this parameter. -```yaml -Type: String -Parameter Sets: (All) -Aliases: Script, relative_path - -Required: False -Position: 1 -Default value: $Pwd -Accept pipeline input: False -Accept wildcard characters: False -``` +If strings are used, they must be paths (wildcards allowed) to source files, and all commands in the files are analyzed for code coverage. -### -ScenarioName +By passing hashtables instead, you can limit the analysis to specific lines or functions within a file. +Hashtables must contain a Path key (which can be abbreviated to just "P"), and may contain Function (or "F"), StartLine (or "S"), +and EndLine ("E") keys to narrow down the commands to be analyzed. +If Function is specified, StartLine and EndLine are ignored. -When set, invokes testing of scenarios which match this name. +If only StartLine is defined, the entire script file starting with StartLine is analyzed. +If only EndLine is present, all lines in the script file up to and including EndLine are analyzed. -Aliased to 'Name' and 'TestName' for compatibility with Pester. +Both Function and Path (as well as simple strings passed instead of hashtables) may contain wildcards. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: Name, TestName - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object[] +DefaultValue: '@()' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -EnableExit @@ -163,127 +149,180 @@ Will cause Invoke-Gherkin to exit with a exit code equal to the number of failed Use this to "fail" a build when any tests fail. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Tag +### -ExcludeTag -Filters Scenarios and Features and runs only the ones tagged with the specified tags. +Informs Invoke-Gherkin to not run blocks tagged with the tags specified. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: Tags - -Required: False -Position: 5 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ExcludeTag +### -FailedLast -Informs Invoke-Gherkin to not run blocks tagged with the tags specified. +Rerun only the scenarios which failed last time ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: RetestFailed + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -CodeCoverage - -Instructs Pester to generate a code coverage report in addition to running tests. -You may pass either hashtables or strings to this parameter. +### -OutputFile -If strings are used, they must be paths (wildcards allowed) to source files, and all commands in the files are analyzed for code coverage. +The path to write a report file to. +If this path is not provided, no log will be generated. -By passing hashtables instead, you can limit the analysis to specific lines or functions within a file. -Hashtables must contain a Path key (which can be abbreviated to just "P"), and may contain Function (or "F"), StartLine (or "S"), -and EndLine ("E") keys to narrow down the commands to be analyzed. -If Function is specified, StartLine and EndLine are ignored. +```yaml +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` -If only StartLine is defined, the entire script file starting with StartLine is analyzed. -If only EndLine is present, all lines in the script file up to and including EndLine are analyzed. +### -OutputFormat -Both Function and Path (as well as simple strings passed instead of hashtables) may contain wildcards. +The format for output (LegacyNUnitXml or NUnitXml), defaults to NUnitXml ```yaml -Type: Object[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: NUnitXml +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Strict +### -PassThru -Makes Pending and Skipped tests to Failed tests. -Useful for continuous integration where you need -to make sure all tests passed. +Returns a custom object (PSCustomObject) that contains the test results. +By default, Invoke-Gherkin writes to the host program, not to the output stream (stdout). +If you try to save the result in a variable, the variable is empty unless you +use the PassThru parameter. +To suppress the host output, use the Quiet parameter. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -OutputFile +### -Path -The path to write a report file to. -If this path is not provided, no log will be generated. +This parameter indicates which feature files should be tested. + +Aliased to 'Script' for compatibility with Pester, but does not support hashtables, since feature files don't take parameters. ```yaml -Type: String -Parameter Sets: (All) +Type: System.String +DefaultValue: $Pwd +SupportsWildcards: false Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +- Script +- relative_path +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -OutputFormat +### -PesterOption -The format for output (LegacyNUnitXml or NUnitXml), defaults to NUnitXml +Sets advanced options for the test execution. +Enter a PesterOption object, +such as one that you create by using the New-PesterOption cmdlet, or a hash table +in which the keys are option names and the values are option values. +For more information on the options available, see the help for New-PesterOption. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: NUnitXml -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Quiet @@ -293,35 +332,45 @@ No other output is generated unless you specify PassThru, or one of the Output parameters. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -PesterOption +### -ScenarioName -Sets advanced options for the test execution. -Enter a PesterOption object, -such as one that you create by using the New-PesterOption cmdlet, or a hash table -in which the keys are option names and the values are option values. -For more information on the options available, see the help for New-PesterOption. +When set, invokes testing of scenarios which match this name. + +Aliased to 'Name' and 'TestName' for compatibility with Pester. ```yaml -Type: Object -Parameter Sets: (All) +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +- Name +- TestName +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Show @@ -343,41 +392,73 @@ This parameter does not affect the PassThru custom object or the XML output that is written when you use the Output parameters. ```yaml -Type: OutputTypes -Parameter Sets: (All) -Aliases: -Accepted values: None, Default, Passed, Failed, Pending, Skipped, Inconclusive, Describe, Context, Summary, Header, Fails, All +Type: Pester.OutputTypes +DefaultValue: All +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Strict -Required: False -Position: Named -Default value: All -Accept pipeline input: False -Accept wildcard characters: False +Makes Pending and Skipped tests to Failed tests. +Useful for continuous integration where you need +to make sure all tests passed. + +```yaml +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -PassThru +### -Tag -Returns a custom object (PSCustomObject) that contains the test results. -By default, Invoke-Gherkin writes to the host program, not to the output stream (stdout). -If you try to save the result in a variable, the variable is empty unless you -use the PassThru parameter. -To suppress the host output, use the Quiet parameter. +Filters Scenarios and Features and runs only the ones tagged with the specified tags. ```yaml -Type: SwitchParameter -Parameter Sets: (All) +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +- Tags +ParameterSets: +- Name: (All) + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -387,10 +468,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/Invoke-Pester](https://pester.dev/docs/v4/commands/Invoke-Pester) - -[https://kevinmarquette.github.io/2017-04-30-Powershell-Gherkin-advanced-features/](https://kevinmarquette.github.io/2017-04-30-Powershell-Gherkin-advanced-features/) +- [Invoke-Pester +https://kevinmarquette.github.io/2017-03-17-Powershell-Gherkin-specification-validation/]() +- [https://kevinmarquette.github.io/2017-04-30-Powershell-Gherkin-advanced-features/](https://kevinmarquette.github.io/2017-04-30-Powershell-Gherkin-advanced-features/) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/Invoke-Pester.mdx b/versioned_docs/version-v4/commands/Invoke-Pester.mdx index 41081c65..f033fb36 100644 --- a/versioned_docs/version-v4/commands/Invoke-Pester.mdx +++ b/versioned_docs/version-v4/commands/Invoke-Pester.mdx @@ -1,9 +1,9 @@ --- id: Invoke-Pester title: Invoke-Pester -description: Help page for the Powershell Pester "Invoke-Pester" command +description: Help for Pester command 'Invoke-Pester'. Runs Pester tests keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ 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 Runs Pester tests @@ -21,20 +25,20 @@ Runs Pester tests ### Default (Default) ```powershell -Invoke-Pester [[-Script] ] [[-TestName] ] [-EnableExit] [[-Tag] ] - [-ExcludeTag ] [-PassThru] [-CodeCoverage ] [-CodeCoverageOutputFile ] - [-CodeCoverageOutputFileEncoding ] [-CodeCoverageOutputFileFormat ] [-Strict] [-Quiet] - [-PesterOption ] [-Show ] [] +Invoke-Pester [[-Script] ] [[-TestName] ] [-EnableExit] [[-Tag] ] + [-ExcludeTag ] [-PassThru] [-CodeCoverage ] [-CodeCoverageOutputFile ] + [-CodeCoverageOutputFileEncoding ] [-CodeCoverageOutputFileFormat ] [-Strict] + [-Quiet] [-PesterOption ] [-Show ] ``` ### NewOutputSet ```powershell -Invoke-Pester [[-Script] ] [[-TestName] ] [-EnableExit] [[-Tag] ] - [-ExcludeTag ] [-PassThru] [-CodeCoverage ] [-CodeCoverageOutputFile ] - [-CodeCoverageOutputFileEncoding ] [-CodeCoverageOutputFileFormat ] [-Strict] - -OutputFile [-OutputFormat ] [-Quiet] [-PesterOption ] [-Show ] - [] +Invoke-Pester [[-Script] ] [[-TestName] ] [-EnableExit] [[-Tag] ] + -OutputFile [-ExcludeTag ] [-PassThru] [-CodeCoverage ] + [-CodeCoverageOutputFile ] [-CodeCoverageOutputFileEncoding ] + [-CodeCoverageOutputFileFormat ] [-Strict] [-OutputFormat ] [-Quiet] + [-PesterOption ] [-Show ] ``` ## DESCRIPTION @@ -76,7 +80,7 @@ execution and returns the code that ran as a percentage of all tested code. Invoke-Pester, and the Pester module that exports it, are products of an open-source project hosted on GitHub. To view, comment, or contribute to the -repository, see [https://github.com/Pester](https://github.com/Pester). +repository, see https://github.com/Pester. ## EXAMPLES @@ -105,7 +109,7 @@ Invoke-Pester -Script D:\MyModule, @{ Path = '.\Tests\Utility\ModuleUnit.Tests.p This command runs all *.Tests.ps1 files in D:\MyModule and its subdirectories. It also runs the tests in the ModuleUnit.Tests.ps1 file using the following -parameters: `.\Tests\Utility\ModuleUnit.Tests.ps1 srvNano16 -Name User01` +parameters: .\Tests\Utility\ModuleUnit.Tests.ps1 srvNano16 -Name User01 ### EXAMPLE 4 @@ -115,7 +119,7 @@ Invoke-Pester -Script @{Script = $scriptText} This command runs all tests passed as string in $scriptText variable with no aditional parameters and arguments. This notation can be combined with -`Invoke-Pester -Script D:\MyModule, @{ Path = '.\Tests\Utility\ModuleUnit.Tests.ps1'; Parameters = @{ Name = 'User01' }; Arguments = srvNano16 }` +Invoke-Pester -Script D:\MyModule, @\{ Path = '.\Tests\Utility\ModuleUnit.Tests.ps1'; Parameters = @\{ Name = 'User01' \}; Arguments = srvNano16 \} if needed. This command can be used when tests and scripts are stored not on the FileSystem, but somewhere else, and it is impossible to provide a path to it. @@ -237,174 +241,6 @@ also has a Bug tag. ## PARAMETERS -### -Script - -Specifies the test files that Pester runs. -You can also use the Script parameter -to pass parameter names and values to a script that contains Pester tests. -The -value of the Script parameter can be a string, a hash table, or a collection -of hash tables and strings. -Wildcard characters are supported. - -The Script parameter is optional. -If you omit it, Invoke-Pester runs all -*.Tests.ps1 files in the local directory and its subdirectories recursively. - -To run tests in other files, such as .ps1 files, enter the path and file name of -the file. -(The file name is required. -Name patterns that end in "*.ps1" run only -*.Tests.ps1 files.) - -To run a Pester test with parameter names and/or values, use a hash table as the -value of the script parameter. -The keys in the hash table are: - --- Path [string] (required): Specifies a test to run. -The value is a path\file -name or name pattern. -Wildcards are permitted. -All hash tables in a Script -parameter value must have a Path key. - --- Parameters [hashtable]: Runs the script with the specified parameters. -The -value is a nested hash table with parameter name and value pairs, such as -`@{UserName = 'User01'; Id = '28'}`. - --- Arguments [array]: An array or comma-separated list of parameter values -without names, such as 'User01', 28. -Use this key to pass values to positional -parameters. - -```yaml -Type: Object[] -Parameter Sets: (All) -Aliases: Path, relative_path - -Required: False -Position: 1 -Default value: . -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -TestName - -Runs only tests in Describe blocks that have the specified name or name pattern. -Wildcard characters are supported. - -If you specify multiple TestName values, Invoke-Pester runs tests that have any -of the values in the Describe name (it ORs the TestName values). - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: Name - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EnableExit - -Will cause Invoke-Pester to exit with a exit code equal to the number of failed -tests once all tests have been run. -Use this to "fail" a build when any tests fail. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tag - -Runs only tests in Describe blocks with the specified Tag parameter values. -Wildcard characters are supported. -Tag values that include spaces or whitespace -will be split into multiple tags on the whitespace. - -When you specify multiple Tag values, Invoke-Pester runs tests that have any -of the listed tags (it ORs the tags). -However, when you specify TestName -and Tag values, Invoke-Pester runs only describe blocks that have one of the -specified TestName values and one of the specified Tag values. - -If you use both Tag and ExcludeTag, ExcludeTag takes precedence. - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: Tags - -Required: False -Position: 5 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ExcludeTag - -Omits tests in Describe blocks with the specified Tag parameter values. -Wildcard -characters are supported. -Tag values that include spaces or whitespace -will be split into multiple tags on the whitespace. - -When you specify multiple ExcludeTag values, Invoke-Pester omits tests that have -any of the listed tags (it ORs the tags). -However, when you specify TestName -and ExcludeTag values, Invoke-Pester omits only describe blocks that have one -of the specified TestName values and one of the specified Tag values. - -If you use both Tag and ExcludeTag, ExcludeTag takes precedence - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PassThru - -Returns a custom object (PSCustomObject) that contains the test results. - -By default, Invoke-Pester writes to the host program, not to the output stream (stdout). -If you try to save the result in a variable, the variable is empty unless you -use the PassThru parameter. - -To suppress the host output, use the Show parameter set to None. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -CodeCoverage Adds a code coverage report to the Pester tests. @@ -440,19 +276,19 @@ IncludeTests = $true option, as shown below. To run a code coverage test only on selected classes, functions or lines in a script, enter a hash table value with the following keys: --- Path (P)(mandatory) \: Enter one path to the files. +-- Path (P)(mandatory) <string>: Enter one path to the files. Wildcard characters are supported, but only one string is permitted. --- IncludeTests \: Includes code coverage for Pester test files (*.tests.ps1). +-- IncludeTests <bool>: Includes code coverage for Pester test files (*.tests.ps1). Default is false. One of the following: Class/Function or StartLine/EndLine --- Class (C) \: Enter the class name. +-- Class (C) <string>: Enter the class name. Wildcard characters are supported, but only one string is permitted. Default is *. --- Function (F) \: Enter the function name. +-- Function (F) <string>: Enter the function name. Wildcard characters are supported, but only one string is permitted. Default is *. @@ -466,15 +302,20 @@ Default is line 1. Default is the last line of the script. ```yaml -Type: Object[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object[] +DefaultValue: '@()' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CodeCoverageOutputFile @@ -487,15 +328,20 @@ a required extension (usually the xml). If this path is not provided, no file will be generated. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CodeCoverageOutputFileEncoding @@ -508,15 +354,20 @@ Supported encodings in the respective PowerShell version are the same as those supported by the cmdlet Out-File in that PowerShell version. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: Utf8 -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: utf8 +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CodeCoverageOutputFileFormat @@ -529,33 +380,76 @@ Currently supported formats are: - JaCoCo - this XML file format is compatible with the VSTS/TFS ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: JaCoCo -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: JaCoCo +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Strict +### -EnableExit -Makes Pending and Skipped tests to Failed tests. -Useful for continuous -integration where you need to make sure all tests passed. +Will cause Invoke-Pester to exit with a exit code equal to the number of failed +tests once all tests have been run. +Use this to "fail" a build when any tests fail. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -ExcludeTag + +Omits tests in Describe blocks with the specified Tag parameter values. +Wildcard +characters are supported. +Tag values that include spaces or whitespace +will be split into multiple tags on the whitespace. + +When you specify multiple ExcludeTag values, Invoke-Pester omits tests that have +any of the listed tags (it ORs the tags). +However, when you specify TestName +and ExcludeTag values, Invoke-Pester omits only describe blocks that have one +of the specified TestName values and one of the specified Tag values. + +If you use both Tag and ExcludeTag, ExcludeTag takes precedence -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +```yaml +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -OutputFile @@ -568,15 +462,20 @@ the xml extension. If this path is not provided, no log will be generated. ```yaml -Type: String -Parameter Sets: NewOutputSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: NewOutputSet + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -OutputFormat @@ -586,15 +485,72 @@ Two formats of output are supported: NUnitXml and JUnitXml. ```yaml -Type: String -Parameter Sets: NewOutputSet -Aliases: +Type: System.String +DefaultValue: NUnitXml +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: NewOutputSet + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` -Required: False -Position: Named -Default value: NUnitXml -Accept pipeline input: False -Accept wildcard characters: False +### -PassThru + +Returns a custom object (PSCustomObject) that contains the test results. + +By default, Invoke-Pester writes to the host program, not to the output stream (stdout). +If you try to save the result in a variable, the variable is empty unless you +use the PassThru parameter. + +To suppress the host output, use the Show parameter set to None. + +```yaml +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -PesterOption + +Sets advanced options for the test execution. +Enter a PesterOption object, +such as one that you create by using the New-PesterOption cmdlet, or a hash table +in which the keys are option names and the values are option values. +For more information on the options available, see the help for New-PesterOption. + +```yaml +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Quiet @@ -612,35 +568,80 @@ This parameter does not affect the PassThru custom object or the XML output that is written when you use the Output parameters. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -PesterOption +### -Script -Sets advanced options for the test execution. -Enter a PesterOption object, -such as one that you create by using the New-PesterOption cmdlet, or a hash table -in which the keys are option names and the values are option values. -For more information on the options available, see the help for New-PesterOption. +Specifies the test files that Pester runs. +You can also use the Script parameter +to pass parameter names and values to a script that contains Pester tests. +The +value of the Script parameter can be a string, a hash table, or a collection +of hash tables and strings. +Wildcard characters are supported. + +The Script parameter is optional. +If you omit it, Invoke-Pester runs all +*.Tests.ps1 files in the local directory and its subdirectories recursively. + +To run tests in other files, such as .ps1 files, enter the path and file name of +the file. +(The file name is required. +Name patterns that end in "*.ps1" run only +*.Tests.ps1 files.) + +To run a Pester test with parameter names and/or values, use a hash table as the +value of the script parameter. +The keys in the hash table are: + +-- Path [string] (required): Specifies a test to run. +The value is a path\file +name or name pattern. +Wildcards are permitted. +All hash tables in a Script +parameter value must have a Path key. + +-- Parameters [hashtable]: Runs the script with the specified parameters. +The +value is a nested hash table with parameter name and value pairs, such as +@\{UserName = 'User01'; Id = '28'\}. + +-- Arguments [array]: An array or comma-separated list of parameter values +without names, such as 'User01', 28. +Use this key to pass values to positional +parameters. ```yaml -Type: Object -Parameter Sets: (All) +Type: System.Object[] +DefaultValue: . +SupportsWildcards: false Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +- Path +- relative_path +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Show @@ -662,21 +663,110 @@ This parameter does not affect the PassThru custom object or the XML output that is written when you use the Output parameters. ```yaml -Type: OutputTypes -Parameter Sets: (All) +Type: Pester.OutputTypes +DefaultValue: All +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Strict + +Makes Pending and Skipped tests to Failed tests. +Useful for continuous +integration where you need to make sure all tests passed. + +```yaml +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Tag + +Runs only tests in Describe blocks with the specified Tag parameter values. +Wildcard characters are supported. +Tag values that include spaces or whitespace +will be split into multiple tags on the whitespace. + +When you specify multiple Tag values, Invoke-Pester runs tests that have any +of the listed tags (it ORs the tags). +However, when you specify TestName +and Tag values, Invoke-Pester runs only describe blocks that have one of the +specified TestName values and one of the specified Tag values. + +If you use both Tag and ExcludeTag, ExcludeTag takes precedence. + +```yaml +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false Aliases: -Accepted values: None, Default, Passed, Failed, Pending, Skipped, Inconclusive, Describe, Context, Summary, Header, Fails, All +- Tags +ParameterSets: +- Name: (All) + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -TestName + +Runs only tests in Describe blocks that have the specified name or name pattern. +Wildcard characters are supported. + +If you specify multiple TestName values, Invoke-Pester runs tests that have any +of the values in the Describe name (it ORs the TestName values). -Required: False -Position: Named -Default value: All -Accept pipeline input: False -Accept wildcard characters: False +```yaml +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: +- Name +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -686,10 +776,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/Describe](https://pester.dev/docs/v4/commands/Describe) - -[https://pester.dev/docs/v4/commands/New-PesterOption](https://pester.dev/docs/v4/commands/New-PesterOption) +- [https://pester.dev/docs/commands/Describe](https://pester.dev/docs/commands/Describe) +- [https://pester.dev/docs/commands/New-PesterOption](https://pester.dev/docs/commands/New-PesterOption) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/It.mdx b/versioned_docs/version-v4/commands/It.mdx index 37ab6039..ff4efa19 100644 --- a/versioned_docs/version-v4/commands/It.mdx +++ b/versioned_docs/version-v4/commands/It.mdx @@ -1,9 +1,9 @@ --- id: It title: It -description: Help page for the Powershell Pester "It" command +description: Help for Pester command 'It'. Validates the results of a test inside of a Describe block. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ 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 Validates the results of a test inside of a Describe block. @@ -21,19 +25,19 @@ Validates the results of a test inside of a Describe block. ### Normal (Default) ```powershell -It [-Name] [[-Test] ] [-TestCases ] [] +It [-Name] [[-Test] ] [-TestCases ] ``` ### Pending ```powershell -It [-Name] [[-Test] ] [-TestCases ] [-Pending] [] +It [-Name] [[-Test] ] [-TestCases ] [-Pending] ``` ### Skip ```powershell -It [-Name] [[-Test] ] [-TestCases ] [-Skip] [] +It [-Name] [[-Test] ] [-TestCases ] [-Skip] ``` ## DESCRIPTION @@ -62,7 +66,6 @@ command as the first tested statement in the It block. ```powershell function Add-Numbers($a, $b) { return $a + $b - } Describe "Add-Numbers" { @@ -93,7 +96,6 @@ Describe "Add-Numbers" { ```powershell function Add-Numbers($a, $b) { return $a + $b - } Describe "Add-Numbers" { @@ -104,7 +106,7 @@ Describe "Add-Numbers" { @{ a = 'two'; b = 'three'; expectedResult = 'twothree' } ) - It 'Correctly adds \ and \ to get \' -TestCases $testCases { + It 'Correctly adds and to get ' -TestCases $testCases { param ($a, $b, $expectedResult) $sum = Add-Numbers $a $b @@ -120,57 +122,20 @@ Describe "Add-Numbers" { An expressive phrase describing the expected test outcome. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Test - -The script block that should throw an exception if the -expectation of the test is not met.If you are following the -AAA pattern (Arrange-Act-Assert), this typically holds the -Assert. - -```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: { } -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -TestCases - -Optional array of hashtable (or any IDictionary) objects. -If this parameter is used, -Pester will call the test script block once for each table in the TestCases array, -splatting the dictionary to the test script block as input. -If you want the name of -the test to appear differently for each test case, you can embed tokens into the Name -parameter with the syntax 'Adds numbers \ and \' (assuming you have keys named A and B -in your TestCases hashtables.) - -```yaml -Type: IDictionary[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Pending @@ -182,15 +147,20 @@ An empty test, that is a test that contains nothing except whitespace or comments is marked as Pending by default. ```yaml -Type: SwitchParameter -Parameter Sets: Pending -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Pending + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Skip @@ -202,20 +172,81 @@ Use the Strict parameter of Invoke-Pester to force all skipped tests to fail. ```yaml -Type: SwitchParameter -Parameter Sets: Skip -Aliases: Ignore - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: +- Ignore +ParameterSets: +- Name: Skip + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Test + +The script block that should throw an exception if the +expectation of the test is not met.If you are following the +AAA pattern (Arrange-Act-Assert), this typically holds the +Assert. + +```yaml +Type: System.Management.Automation.ScriptBlock +DefaultValue: '{ }' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -TestCases + +Optional array of hashtable (or any IDictionary) objects. + If this parameter is used, +Pester will call the test script block once for each table in the TestCases array, +splatting the dictionary to the test script block as input. + If you want the name of +the test to appear differently for each test case, you can embed tokens into the Name +parameter with the syntax 'Adds numbers <A> and <B>' (assuming you have keys named A and B +in your TestCases hashtables.) + +```yaml +Type: System.Collections.IDictionary[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -225,14 +256,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/Describe](https://pester.dev/docs/v4/commands/Describe) - -[https://pester.dev/docs/v4/commands/Context](https://pester.dev/docs/v4/commands/Context) - -[https://pester.dev/docs/v4/commands/Set-TestInconclusive](https://pester.dev/docs/v4/commands/Set-TestInconclusive) - -[https://pester.dev/docs/v4/commands/Should](https://pester.dev/docs/v4/commands/Should) +- [https://pester.dev/docs/commands/Describe](https://pester.dev/docs/commands/Describe) +- [https://pester.dev/docs/commands/Context](https://pester.dev/docs/commands/Context) +- [https://pester.dev/docs/commands/Set-TestInconclusive](https://pester.dev/docs/commands/Set-TestInconclusive) +- [https://pester.dev/docs/commands/Should](https://pester.dev/docs/commands/Should) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/Mock.mdx b/versioned_docs/version-v4/commands/Mock.mdx index 31f092b1..89fca279 100644 --- a/versioned_docs/version-v4/commands/Mock.mdx +++ b/versioned_docs/version-v4/commands/Mock.mdx @@ -1,9 +1,9 @@ --- id: Mock title: Mock -description: Help page for the Powershell Pester "Mock" command +description: Help for Pester command 'Mock'. Mocks the behavior of an existing command with an alternate implementation. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ 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 Mocks the behavior of an existing command with an alternate @@ -20,9 +24,9 @@ implementation. ## SYNTAX ```powershell -Mock [[-CommandName] ] [[-MockWith] ] [-Verifiable] [[-ParameterFilter] ] - [[-ModuleName] ] [[-RemoveParameterType] ] [[-RemoveParameterValidation] ] - [] +Mock [[-CommandName] ] [[-MockWith] ] [[-ParameterFilter] ] + [[-ModuleName] ] [[-RemoveParameterType] ] + [[-RemoveParameterValidation] ] [-Verifiable] ``` ## DESCRIPTION @@ -160,11 +164,10 @@ New-Module -Name ModuleMockExample -ScriptBlock { function Hidden { "Internal Module Function" } function Exported { Hidden } - Export-ModuleMember -Function Exported +Export-ModuleMember -Function Exported } | Import-Module -Force Describe "ModuleMockExample" { - It "Hidden function is not directly accessible outside the module" { { Hidden } | Should -Throw } @@ -190,15 +193,20 @@ mocked by using the -ModuleName parameter. The name of the command to be mocked. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -MockWith @@ -211,32 +219,45 @@ being mocked, and the MockWith script block can contain references to the mocked commands parameter variables. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: { } -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '{ }' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Verifiable +### -ModuleName -When this is set, the mock will be checked when Assert-VerifiableMock is -called. +Optional string specifying the name of the module where this command +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. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ParameterFilter @@ -249,35 +270,20 @@ This ScriptBlock must return a boolean value. See examples for usage. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: { $True } -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ModuleName - -Optional string specifying the name of the module where this command -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. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '{ $True }' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -RemoveParameterType @@ -295,15 +301,20 @@ configuration of parameters will be ingored, including parameter validation described below. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 5 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -RemoveParameterValidation @@ -320,20 +331,50 @@ configuration of parameters will be ingored, including parameter types described above. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 6 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 5 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Verifiable + +When this is set, the mock will be checked when Assert-VerifiableMock is +called. + +```yaml +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -343,20 +384,14 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/Assert-MockCalled](https://pester.dev/docs/v4/commands/Assert-MockCalled) - -[https://pester.dev/docs/v4/commands/Assert-VerifiableMock](https://pester.dev/docs/v4/commands/Assert-VerifiableMock) - -[https://pester.dev/docs/v4/commands/Describe](https://pester.dev/docs/v4/commands/Describe) - -[https://pester.dev/docs/v4/commands/Context](https://pester.dev/docs/v4/commands/Context) - -[https://pester.dev/docs/v4/commands/It](https://pester.dev/docs/v4/commands/It) - -[https://pester.dev/docs/v4/commands/Should](https://pester.dev/docs/v4/commands/Should) - -[https://pester.dev/docs/v4/usage/mocking](https://pester.dev/docs/v4/usage/mocking) +- [https://pester.dev/docs/commands/Assert-MockCalled](https://pester.dev/docs/commands/Assert-MockCalled) +- [https://pester.dev/docs/commands/Assert-VerifiableMock](https://pester.dev/docs/commands/Assert-VerifiableMock) +- [https://pester.dev/docs/commands/Describe](https://pester.dev/docs/commands/Describe) +- [https://pester.dev/docs/commands/Context](https://pester.dev/docs/commands/Context) +- [https://pester.dev/docs/commands/It](https://pester.dev/docs/commands/It) +- [https://pester.dev/docs/commands/Should](https://pester.dev/docs/commands/Should) +- [https://pester.dev/docs/usage/mocking](https://pester.dev/docs/usage/mocking) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/New-Fixture.mdx b/versioned_docs/version-v4/commands/New-Fixture.mdx index 961d4a9c..63744540 100644 --- a/versioned_docs/version-v4/commands/New-Fixture.mdx +++ b/versioned_docs/version-v4/commands/New-Fixture.mdx @@ -1,9 +1,9 @@ --- id: New-Fixture title: New-Fixture -description: Help page for the Powershell Pester "New-Fixture" command +description: Help for Pester command 'New-Fixture'. This function generates two scripts, one that defines a function and another one that contains its tests. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ 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 This function generates two scripts, one that defines a function @@ -20,7 +24,7 @@ and another one that contains its tests. ## SYNTAX ```powershell -New-Fixture [[-Path] ] [-Name] [] +New-Fixture [[-Path] ] [-Name] ``` ## DESCRIPTION @@ -34,7 +38,6 @@ The script defining the function: .\Clean.ps1: ``` function Clean { - } The script containing the example test .\Clean.Tests.ps1: @@ -45,7 +48,6 @@ $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.Tests\.', '.' "$here\$sut" Describe "Clean" { - It "does something useful" { $true | Should -Be $false } @@ -80,42 +82,55 @@ Creates a new folder named Cleaner in the current directory and creates the scri ## PARAMETERS -### -Path +### -Name -Defines path where the test and the function should be created, you can use full or relative path. -If the parameter is not specified the scripts are created in the current directory. +Defines the name of the function and the name of the test to be created. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: $PWD -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Name +### -Path -Defines the name of the function and the name of the test to be created. +Defines path where the test and the function should be created, you can use full or relative path. +If the parameter is not specified the scripts are created in the current directory. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: $PWD +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -125,14 +140,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/Describe](https://pester.dev/docs/v4/commands/Describe) - -[https://pester.dev/docs/v4/commands/Context](https://pester.dev/docs/v4/commands/Context) - -[https://pester.dev/docs/v4/commands/It](https://pester.dev/docs/v4/commands/It) - -[https://pester.dev/docs/v4/commands/Should](https://pester.dev/docs/v4/commands/Should) +- [https://pester.dev/docs/commands/Describe](https://pester.dev/docs/commands/Describe) +- [https://pester.dev/docs/commands/Context](https://pester.dev/docs/commands/Context) +- [https://pester.dev/docs/commands/It](https://pester.dev/docs/commands/It) +- [https://pester.dev/docs/commands/Should](https://pester.dev/docs/commands/Should) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/New-MockObject.mdx b/versioned_docs/version-v4/commands/New-MockObject.mdx index eaf121b2..d0ee9e1b 100644 --- a/versioned_docs/version-v4/commands/New-MockObject.mdx +++ b/versioned_docs/version-v4/commands/New-MockObject.mdx @@ -1,9 +1,9 @@ --- id: New-MockObject title: New-MockObject -description: Help page for the Powershell Pester "New-MockObject" command +description: Help for Pester command 'New-MockObject'. This function instantiates a .NET object from a type. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ 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 This function instantiates a .NET object from a type. @@ -19,7 +23,7 @@ This function instantiates a .NET object from a type. ## SYNTAX ```powershell -New-MockObject [-Type] [] +New-MockObject [-Type] ``` ## DESCRIPTION @@ -45,20 +49,28 @@ $obj.GetType().FullName The .NET type to create an object based on. ```yaml -Type: Type -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Type +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -68,6 +80,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/New-PesterOption.mdx b/versioned_docs/version-v4/commands/New-PesterOption.mdx index 3019af87..af6e2a8c 100644 --- a/versioned_docs/version-v4/commands/New-PesterOption.mdx +++ b/versioned_docs/version-v4/commands/New-PesterOption.mdx @@ -1,9 +1,9 @@ --- id: New-PesterOption title: New-PesterOption -description: Help page for the Powershell Pester "New-PesterOption" command +description: Help for Pester command 'New-PesterOption'. Creates an object that contains advanced options for Invoke-Pester keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ 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 an object that contains advanced options for Invoke-Pester @@ -19,8 +23,8 @@ Creates an object that contains advanced options for Invoke-Pester ## SYNTAX ```powershell -New-PesterOption [-IncludeVSCodeMarker] [[-TestSuiteName] ] [-Experimental] [-ShowScopeHints] - [[-ScriptBlockFilter] ] [] +New-PesterOption [[-TestSuiteName] ] [[-ScriptBlockFilter] ] + [-IncludeVSCodeMarker] [-Experimental] [-ShowScopeHints] ``` ## DESCRIPTION @@ -44,54 +48,69 @@ will be named "Tests - Set A". ## PARAMETERS -### -IncludeVSCodeMarker +### -Experimental -When this switch is set, an extra line of output will be written to the console for test failures, making it easier -for VSCode's parser to provide highlighting / tooltips on the line where the error occurred. +Enables experimental features of Pester to be enabled. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -TestSuiteName +### -IncludeVSCodeMarker -When generating NUnit XML output, this controls the name assigned to the root "test-suite" element. -Defaults to "Pester". +When this switch is set, an extra line of output will be written to the console for test failures, making it easier +for VSCode's parser to provide highlighting / tooltips on the line where the error occurred. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: Pester -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Experimental +### -ScriptBlockFilter -Enables experimental features of Pester to be enabled. +Filters scriptblock based on the path and line number. +This is intended for integration with external tools so we don't rely on names (strings) that can have expandable variables in them. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Collections.Hashtable[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ShowScopeHints @@ -100,43 +119,57 @@ EXPERIMENTAL: Enables debugging output for debugging tranisition among scopes. (Experimental flag needs to be used to enable this.) ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ScriptBlockFilter +### -TestSuiteName -Filters scriptblock based on the path and line number. -This is intended for integration with external tools so we don't rely on names (strings) that can have expandable variables in them. +When generating NUnit XML output, this controls the name assigned to the root "test-suite" element. + Defaults to "Pester". ```yaml -Type: Hashtable[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: Pester +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS ### None -### You cannot pipe input to this command. +You cannot pipe input to this command. + ## OUTPUTS ### System.Management.Automation.PSObject @@ -145,8 +178,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/Invoke-Pester](https://pester.dev/docs/v4/commands/Invoke-Pester) +- [https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/Set-ItResult.mdx b/versioned_docs/version-v4/commands/Set-ItResult.mdx index f5c429f3..f5fe7e40 100644 --- a/versioned_docs/version-v4/commands/Set-ItResult.mdx +++ b/versioned_docs/version-v4/commands/Set-ItResult.mdx @@ -1,9 +1,9 @@ --- id: Set-ItResult title: Set-ItResult -description: Help page for the Powershell Pester "Set-ItResult" command +description: Help for Pester command 'Set-ItResult'. Set-ItResult is used inside the It block to explicitly set the test result keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ 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 Set-ItResult is used inside the It block to explicitly set the test result @@ -21,19 +25,19 @@ Set-ItResult is used inside the It block to explicitly set the test result ### Inconclusive ```powershell -Set-ItResult [-Inconclusive] [-Because ] [] +Set-ItResult [-Inconclusive] [-Because ] ``` ### Pending ```powershell -Set-ItResult [-Pending] [-Because ] [] +Set-ItResult [-Pending] [-Because ] ``` ### Skipped ```powershell -Set-ItResult [-Skipped] [-Because ] [] +Set-ItResult [-Skipped] [-Because ] ``` ## DESCRIPTION @@ -57,7 +61,7 @@ Describe "Example" { the output should be -``` +```powershell [?] Inconclusive result test, is inconclusive, because we want it to be inconclusive Tests completed in 0ms Tests Passed: 0, Failed: 0, Skipped: 0, Pending: 0, Inconclusive 1 @@ -75,7 +79,7 @@ Describe "Example" { the output should be -``` +```powershell [!] Skipped test, is skipped, because we want it to be skipped Tests completed in 0ms Tests Passed: 0, Failed: 0, Skipped: 0, Pending: 0, Inconclusive 1 @@ -83,21 +87,49 @@ Tests Passed: 0, Failed: 0, Skipped: 0, Pending: 0, Inconclusive 1 ## PARAMETERS +### -Because + +Similarily to failing tests, skipped and inconclusive tests should have reason. +It allows +to provide information to the user why the test is neither successful nor failed. + +```yaml +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + ### -Inconclusive Sets the test result to inconclusive. Cannot be used at the same time as -Pending or -Skipped ```yaml -Type: SwitchParameter -Parameter Sets: Inconclusive -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Inconclusive + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Pending @@ -106,15 +138,20 @@ Sets the test result to pending. Cannot be used at the same time as -Inconclusive or -Skipped ```yaml -Type: SwitchParameter -Parameter Sets: Pending -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Pending + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Skipped @@ -123,38 +160,28 @@ Sets the test result to skipped. Cannot be used at the same time as -Inconclusive or -Pending ```yaml -Type: SwitchParameter -Parameter Sets: Skipped -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Because - -Similarily to failing tests, skipped and inconclusive tests should have reason. -It allows -to provide information to the user why the test is neither successful nor failed. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Skipped + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -164,6 +191,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/Set-TestInconclusive.mdx b/versioned_docs/version-v4/commands/Set-TestInconclusive.mdx index bad67887..173c7986 100644 --- a/versioned_docs/version-v4/commands/Set-TestInconclusive.mdx +++ b/versioned_docs/version-v4/commands/Set-TestInconclusive.mdx @@ -1,9 +1,9 @@ --- id: Set-TestInconclusive title: Set-TestInconclusive -description: Help page for the Powershell Pester "Set-TestInconclusive" command +description: Help for Pester command 'Set-TestInconclusive'. Deprecated. Use `Set-ItResult -Inconclusive` instead keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,15 +12,18 @@ 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 -Deprecated. -Use `Set-ItResult -Inconclusive` instead +Deprecated. Use `Set-ItResult -Inconclusive` instead ## SYNTAX ```powershell -Set-TestInconclusive [[-Message] ] [] +Set-TestInconclusive [[-Message] ] ``` ## DESCRIPTION @@ -34,17 +37,15 @@ If you need this functionality please use the new Set-ItResult command. ```powershell Describe "Example" { - It "My test" { Set-TestInconclusive -Message "we forced it to be inconclusive" } - } ``` The test result. -``` +```powershell Describing Example [?] My test, is inconclusive because we forced it to be inconclusive 58ms ``` @@ -56,20 +57,28 @@ Describing Example Value assigned to the Message parameter will be displayed in the the test result. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -79,6 +88,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/Setup.mdx b/versioned_docs/version-v4/commands/Setup.mdx index 2ce61859..1069c55a 100644 --- a/versioned_docs/version-v4/commands/Setup.mdx +++ b/versioned_docs/version-v4/commands/Setup.mdx @@ -1,9 +1,9 @@ --- id: Setup title: Setup -description: Help page for the Powershell Pester "Setup" command +description: Help for Pester command 'Setup'. {{ Fill in the Synopsis }} keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,15 +12,18 @@ 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 -This command is included in the Pester Mocking framework for backwards compatibility. -You do not need to call it directly. +\{\{ Fill in the Synopsis \}\} ## SYNTAX ```powershell -Setup [-Dir] [-File] [[-Path] ] [[-Content] ] [-PassThru] +Setup [[-Path] ] [[-Content] ] [-Dir] [-File] [-PassThru] ``` ## DESCRIPTION @@ -39,84 +42,109 @@ PS C:\> {{ Add example code here }} ## PARAMETERS -### -Dir +### -Content -\{\{ Fill Dir Description \}\} +\{\{ Fill Content Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -File +### -Dir -\{\{ Fill File Description \}\} +\{\{ Fill Dir Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Path +### -File -\{\{ Fill Path Description \}\} +\{\{ Fill File Description \}\} ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Content +### -PassThru -\{\{ Fill Content Description \}\} +\{\{ Fill PassThru Description \}\} ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -PassThru +### -Path -\{\{ Fill PassThru Description \}\} +\{\{ Fill Path Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ## INPUTS @@ -127,6 +155,6 @@ Accept wildcard characters: False ## RELATED LINKS -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/Should.mdx b/versioned_docs/version-v4/commands/Should.mdx index f2df0b06..97f9f6fd 100644 --- a/versioned_docs/version-v4/commands/Should.mdx +++ b/versioned_docs/version-v4/commands/Should.mdx @@ -1,9 +1,9 @@ --- id: Should title: Should -description: Help page for the Powershell Pester "Should" command +description: Help for Pester command 'Should'. Should is a keyword what is used to define an assertion inside It block. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ 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 Should is a keyword what is used to define an assertion inside It block. @@ -21,164 +25,156 @@ Should is a keyword what is used to define an assertion inside It block. ### Legacy (Default) ```powershell -Should [[-__LegacyArg1] ] [[-__LegacyArg2] ] [[-__LegacyArg3] ] [-ActualValue ] - [] +Should [[-__LegacyArg1] ] [[-__LegacyArg2] ] [[-__LegacyArg3] ] + [-ActualValue ] ``` ### Be ```powershell -Should [-ActualValue ] [-Be] [-Not] [-ExpectedValue ] [-Because ] [] +Should [[-ExpectedValue] ] [[-Because] ] -Be [-ActualValue ] [-Not] ``` ### BeExactly ```powershell -Should [-ActualValue ] [-Not] [-ExpectedValue ] [-Because ] [-BeExactly] - [] +Should [[-ExpectedValue] ] [[-Because] ] -BeExactly [-ActualValue ] [-Not] ``` ### BeGreaterThan ```powershell -Should [-ActualValue ] [-Not] [-ExpectedValue ] [-Because ] [-BeGreaterThan] - [] +Should [[-ExpectedValue] ] [[-Because] ] -BeGreaterThan [-ActualValue ] + [-Not] ``` ### BeLessOrEqual ```powershell -Should [-ActualValue ] [-Not] [-ExpectedValue ] [-Because ] [-BeLessOrEqual] - [] +Should [[-ExpectedValue] ] [[-Because] ] -BeLessOrEqual [-ActualValue ] + [-Not] ``` ### BeIn ```powershell -Should [-ActualValue ] [-Not] [-ExpectedValue ] [-Because ] [-BeIn] - [] +Should [[-ExpectedValue] ] [[-Because] ] -BeIn [-ActualValue ] [-Not] ``` ### BeLessThan ```powershell -Should [-ActualValue ] [-Not] [-ExpectedValue ] [-Because ] [-BeLessThan] - [] +Should [[-ExpectedValue] ] [[-Because] ] -BeLessThan [-ActualValue ] [-Not] ``` ### BeGreaterOrEqual ```powershell -Should [-ActualValue ] [-Not] [-ExpectedValue ] [-Because ] [-BeGreaterOrEqual] - [] +Should [[-ExpectedValue] ] [[-Because] ] -BeGreaterOrEqual [-ActualValue ] + [-Not] ``` ### BeLike ```powershell -Should [-ActualValue ] [-Not] [-ExpectedValue ] [-Because ] [-BeLike] - [] +Should [[-ExpectedValue] ] [[-Because] ] -BeLike [-ActualValue ] [-Not] ``` ### BeLikeExactly ```powershell -Should [-ActualValue ] [-Not] [-ExpectedValue ] [-Because ] [-BeLikeExactly] - [] +Should [[-ExpectedValue] ] [[-Because] ] -BeLikeExactly [-ActualValue ] + [-Not] ``` ### BeNullOrEmpty ```powershell -Should [-ActualValue ] [-Not] [-Because ] [-BeNullOrEmpty] [] +Should [[-Because] ] -BeNullOrEmpty [-ActualValue ] [-Not] ``` ### BeOfType ```powershell -Should [-ActualValue ] [-Not] [-Because ] [-BeOfType] [-ExpectedType ] - [] +Should [[-ExpectedType] ] [[-Because] ] -BeOfType [-ActualValue ] [-Not] ``` ### BeTrue ```powershell -Should [-ActualValue ] [-Not] [-Because ] [-BeTrue] [] +Should [[-Because] ] -BeTrue [-ActualValue ] [-Not] ``` ### BeFalse ```powershell -Should [-ActualValue ] [-Not] [-Because ] [-BeFalse] [] +Should [[-Because] ] -BeFalse [-ActualValue ] [-Not] ``` ### Contain ```powershell -Should [-ActualValue ] [-Not] [-ExpectedValue ] [-Because ] [-Contain] - [] +Should [[-ExpectedValue] ] [[-Because] ] -Contain [-ActualValue ] [-Not] ``` ### Exist ```powershell -Should [-ActualValue ] [-Not] [-Because ] [-Exist] [] +Should [[-Because] ] -Exist [-ActualValue ] [-Not] ``` ### FileContentMatch ```powershell -Should [-ActualValue ] [-Not] [-Because ] [-FileContentMatch] [-ExpectedContent ] - [] +Should [[-ExpectedContent] ] [[-Because] ] -FileContentMatch [-ActualValue ] + [-Not] ``` ### FileContentMatchExactly ```powershell -Should [-ActualValue ] [-Not] [-Because ] [-ExpectedContent ] - [-FileContentMatchExactly] [] +Should [[-ExpectedContent] ] [[-Because] ] -FileContentMatchExactly + [-ActualValue ] [-Not] ``` ### FileContentMatchMultiline ```powershell -Should [-ActualValue ] [-Not] [-Because ] [-ExpectedContent ] - [-FileContentMatchMultiline] [] +Should [[-ExpectedContent] ] [[-Because] ] -FileContentMatchMultiline + [-ActualValue ] [-Not] ``` ### HaveCount ```powershell -Should [-ActualValue ] [-Not] [-ExpectedValue ] [-Because ] [-HaveCount] - [] +Should [[-ExpectedValue] ] [[-Because] ] -HaveCount [-ActualValue ] [-Not] ``` ### HaveParameter ```powershell -Should [-ActualValue ] [-Not] [-Because ] [-HaveParameter] [-ParameterName ] - [-Type ] [-DefaultValue ] [-Mandatory] [-HasArgumentCompleter] [] +Should [[-ParameterName] ] [[-Type] ] [[-DefaultValue] ] [-Mandatory] + [-HasArgumentCompleter] [[-Because] ] -HaveParameter [-ActualValue ] [-Not] ``` ### Match ```powershell -Should [-ActualValue ] [-Not] [-Because ] [-Match] [-RegularExpression ] - [] +Should [[-RegularExpression] ] [[-Because] ] -Match [-ActualValue ] [-Not] ``` ### MatchExactly ```powershell -Should [-ActualValue ] [-Not] [-Because ] [-RegularExpression ] [-MatchExactly] - [] +Should [[-RegularExpression] ] [[-Because] ] -MatchExactly [-ActualValue ] + [-Not] ``` ### Throw ```powershell -Should [-ActualValue ] [-Not] [-Because ] [-Throw] [-ExpectedMessage ] - [-ErrorId ] [-ExceptionType ] [-PassThru] [] +Should [[-ExpectedMessage] ] [[-ErrorId] ] [[-ExceptionType] ] + [[-Because] ] [-PassThru] -Throw [-ActualValue ] [-Not] ``` ## DESCRIPTION @@ -210,15 +206,20 @@ PS C:\> {{ Add example code here }} \{\{ Fill __LegacyArg1 Description \}\} ```yaml -Type: Object -Parameter Sets: Legacy -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -__LegacyArg2 @@ -226,15 +227,20 @@ Accept wildcard characters: False \{\{ Fill __LegacyArg2 Description \}\} ```yaml -Type: Object -Parameter Sets: Legacy -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -__LegacyArg3 @@ -242,15 +248,20 @@ Accept wildcard characters: False \{\{ Fill __LegacyArg3 Description \}\} ```yaml -Type: Object -Parameter Sets: Legacy -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ActualValue @@ -258,15 +269,20 @@ Accept wildcard characters: False \{\{ Fill ActualValue Description \}\} ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Be @@ -274,15 +290,21 @@ Accept wildcard characters: False \{\{ Fill Be Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: Be -Aliases: EQ - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- EQ +ParameterSets: +- Name: Be + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Because @@ -290,15 +312,152 @@ Accept wildcard characters: False \{\{ Fill Because Description \}\} ```yaml -Type: Object -Parameter Sets: Be, BeExactly, BeGreaterThan, BeLessOrEqual, BeIn, BeLessThan, BeGreaterOrEqual, BeLike, BeLikeExactly, BeNullOrEmpty, BeOfType, BeTrue, BeFalse, Contain, Exist, FileContentMatch, FileContentMatchExactly, FileContentMatchMultiline, HaveCount, HaveParameter, Match, MatchExactly, Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Be + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeExactly + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterThan + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessOrEqual + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeIn + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessThan + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterOrEqual + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLike + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLikeExactly + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeNullOrEmpty + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeOfType + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeTrue + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeFalse + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Contain + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Exist + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatch + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchExactly + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchMultiline + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: HaveCount + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: HaveParameter + Position: 6 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Match + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: MatchExactly + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Throw + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeExactly @@ -306,15 +465,21 @@ Accept wildcard characters: False \{\{ Fill BeExactly Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: BeExactly -Aliases: CEQ - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- CEQ +ParameterSets: +- Name: BeExactly + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeFalse @@ -322,15 +487,20 @@ Accept wildcard characters: False \{\{ Fill BeFalse Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: BeFalse -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeFalse + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeGreaterOrEqual @@ -338,15 +508,21 @@ Accept wildcard characters: False \{\{ Fill BeGreaterOrEqual Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: BeGreaterOrEqual -Aliases: GE - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- GE +ParameterSets: +- Name: BeGreaterOrEqual + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeGreaterThan @@ -354,15 +530,21 @@ Accept wildcard characters: False \{\{ Fill BeGreaterThan Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: BeGreaterThan -Aliases: GT - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- GT +ParameterSets: +- Name: BeGreaterThan + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeIn @@ -370,15 +552,20 @@ Accept wildcard characters: False \{\{ Fill BeIn Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: BeIn -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeIn + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeLessOrEqual @@ -386,15 +573,21 @@ Accept wildcard characters: False \{\{ Fill BeLessOrEqual Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: BeLessOrEqual -Aliases: LE - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- LE +ParameterSets: +- Name: BeLessOrEqual + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeLessThan @@ -402,15 +595,21 @@ Accept wildcard characters: False \{\{ Fill BeLessThan Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: BeLessThan -Aliases: LT - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- LT +ParameterSets: +- Name: BeLessThan + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeLike @@ -418,15 +617,20 @@ Accept wildcard characters: False \{\{ Fill BeLike Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: BeLike -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeLike + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeLikeExactly @@ -434,15 +638,20 @@ Accept wildcard characters: False \{\{ Fill BeLikeExactly Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: BeLikeExactly -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeLikeExactly + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeNullOrEmpty @@ -450,15 +659,20 @@ Accept wildcard characters: False \{\{ Fill BeNullOrEmpty Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: BeNullOrEmpty -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeNullOrEmpty + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeOfType @@ -466,15 +680,21 @@ Accept wildcard characters: False \{\{ Fill BeOfType Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: BeOfType -Aliases: HaveType - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- HaveType +ParameterSets: +- Name: BeOfType + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeTrue @@ -482,15 +702,20 @@ Accept wildcard characters: False \{\{ Fill BeTrue Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: BeTrue -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeTrue + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Contain @@ -498,15 +723,20 @@ Accept wildcard characters: False \{\{ Fill Contain Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: Contain -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Contain + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -DefaultValue @@ -514,15 +744,20 @@ Accept wildcard characters: False \{\{ Fill DefaultValue Description \}\} ```yaml -Type: Object -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ErrorId @@ -530,15 +765,20 @@ Accept wildcard characters: False \{\{ Fill ErrorId Description \}\} ```yaml -Type: Object -Parameter Sets: Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Throw + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExceptionType @@ -546,15 +786,20 @@ Accept wildcard characters: False \{\{ Fill ExceptionType Description \}\} ```yaml -Type: Object -Parameter Sets: Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Throw + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Exist @@ -562,15 +807,20 @@ Accept wildcard characters: False \{\{ Fill Exist Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: Exist -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Exist + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExpectedContent @@ -578,15 +828,32 @@ Accept wildcard characters: False \{\{ Fill ExpectedContent Description \}\} ```yaml -Type: Object -Parameter Sets: FileContentMatch, FileContentMatchExactly, FileContentMatchMultiline -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FileContentMatch + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchExactly + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchMultiline + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExpectedMessage @@ -594,15 +861,20 @@ Accept wildcard characters: False \{\{ Fill ExpectedMessage Description \}\} ```yaml -Type: Object -Parameter Sets: Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Throw + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExpectedType @@ -610,15 +882,20 @@ Accept wildcard characters: False \{\{ Fill ExpectedType Description \}\} ```yaml -Type: Object -Parameter Sets: BeOfType -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeOfType + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExpectedValue @@ -626,15 +903,80 @@ Accept wildcard characters: False \{\{ Fill ExpectedValue Description \}\} ```yaml -Type: Object -Parameter Sets: Be, BeExactly, BeGreaterThan, BeLessOrEqual, BeIn, BeLessThan, BeGreaterOrEqual, BeLike, BeLikeExactly, Contain, HaveCount -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Be + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeExactly + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterThan + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessOrEqual + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeIn + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessThan + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterOrEqual + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLike + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLikeExactly + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Contain + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: HaveCount + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -FileContentMatch @@ -642,15 +984,20 @@ Accept wildcard characters: False \{\{ Fill FileContentMatch Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: FileContentMatch -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FileContentMatch + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -FileContentMatchExactly @@ -658,15 +1005,20 @@ Accept wildcard characters: False \{\{ Fill FileContentMatchExactly Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: FileContentMatchExactly -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FileContentMatchExactly + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -FileContentMatchMultiline @@ -674,15 +1026,20 @@ Accept wildcard characters: False \{\{ Fill FileContentMatchMultiline Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: FileContentMatchMultiline -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FileContentMatchMultiline + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -HasArgumentCompleter @@ -690,15 +1047,20 @@ Accept wildcard characters: False \{\{ Fill HasArgumentCompleter Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 5 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -HaveCount @@ -706,15 +1068,20 @@ Accept wildcard characters: False \{\{ Fill HaveCount Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: HaveCount -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveCount + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -HaveParameter @@ -722,15 +1089,20 @@ Accept wildcard characters: False \{\{ Fill HaveParameter Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: HaveParameter -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Mandatory @@ -738,15 +1110,20 @@ Accept wildcard characters: False \{\{ Fill Mandatory Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Match @@ -754,15 +1131,20 @@ Accept wildcard characters: False \{\{ Fill Match Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: Match -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Match + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -MatchExactly @@ -770,15 +1152,21 @@ Accept wildcard characters: False \{\{ Fill MatchExactly Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: MatchExactly -Aliases: CMATCH - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- CMATCH +ParameterSets: +- Name: MatchExactly + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Not @@ -786,15 +1174,152 @@ Accept wildcard characters: False \{\{ Fill Not Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: Be, BeExactly, BeGreaterThan, BeLessOrEqual, BeIn, BeLessThan, BeGreaterOrEqual, BeLike, BeLikeExactly, BeNullOrEmpty, BeOfType, BeTrue, BeFalse, Contain, Exist, FileContentMatch, FileContentMatchExactly, FileContentMatchMultiline, HaveCount, HaveParameter, Match, MatchExactly, Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Be + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterThan + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessOrEqual + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeIn + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessThan + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterOrEqual + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLike + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLikeExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeNullOrEmpty + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeOfType + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeTrue + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeFalse + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Contain + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Exist + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatch + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchMultiline + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: HaveCount + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: HaveParameter + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Match + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: MatchExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Throw + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ParameterName @@ -802,15 +1327,20 @@ Accept wildcard characters: False \{\{ Fill ParameterName Description \}\} ```yaml -Type: Object -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -PassThru @@ -818,15 +1348,20 @@ Accept wildcard characters: False \{\{ Fill PassThru Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Throw + Position: 5 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -RegularExpression @@ -834,15 +1369,26 @@ Accept wildcard characters: False \{\{ Fill RegularExpression Description \}\} ```yaml -Type: Object -Parameter Sets: Match, MatchExactly -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Match + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: MatchExactly + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Throw @@ -850,15 +1396,20 @@ Accept wildcard characters: False \{\{ Fill Throw Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: Throw -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Throw + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Type @@ -866,29 +1417,39 @@ Accept wildcard characters: False \{\{ Fill Type Description \}\} ```yaml -Type: Object -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### 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). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES ## RELATED LINKS -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/docusaurus.sidebar.js b/versioned_docs/version-v4/commands/docusaurus.sidebar.js index 977f3a52..54877fd0 100644 --- a/versioned_docs/version-v4/commands/docusaurus.sidebar.js +++ b/versioned_docs/version-v4/commands/docusaurus.sidebar.js @@ -1,7 +1,7 @@ /** * Import this file in your Docusaurus `sidebars.js` file. * - * Auto-generated by Alt3.Powershell.Docusaurus. + * Auto-generated by Alt3.Docusaurus.Powershell 2.0.0. * * Copyright (c) 2019-present, ALT3 B.V. * From 16c7494ad22ee3f7234c2f7aa929e5dad6147859 Mon Sep 17 00:00:00 2001 From: Frode Flaten <3436158+fflaten@users.noreply.github.com> Date: Mon, 27 Jul 2026 01:15:04 +0200 Subject: [PATCH 09/17] Apply suggestions from code review Co-authored-by: Frode Flaten <3436158+fflaten@users.noreply.github.com> --- versioned_docs/version-v4/commands/Add-AssertionOperator.mdx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/versioned_docs/version-v4/commands/Add-AssertionOperator.mdx b/versioned_docs/version-v4/commands/Add-AssertionOperator.mdx index d51df92f..0bcdf62d 100644 --- a/versioned_docs/version-v4/commands/Add-AssertionOperator.mdx +++ b/versioned_docs/version-v4/commands/Add-AssertionOperator.mdx @@ -1,5 +1,8 @@ --- -id: Add-AssertionOperator +# Override id to have common docId for Commands navbar-link for all versions +id: Add-ShouldOperator +# Override slug so url matches v4 name +slug: Add-AssertionOperator title: Add-AssertionOperator description: Help for Pester command 'Add-AssertionOperator'. Register an Assertion Operator with Pester keywords: From c6178ab456fb86401b1423c3f92be66b1ae4934a Mon Sep 17 00:00:00 2001 From: Frode Flaten <3436158+fflaten@users.noreply.github.com> Date: Mon, 27 Jul 2026 01:46:18 +0200 Subject: [PATCH 10/17] Apply suggestions from code review Co-authored-by: Frode Flaten <3436158+fflaten@users.noreply.github.com> --- versioned_docs/version-v5/commands/Assert-MockCalled.mdx | 8 ++++++-- .../version-v5/commands/Assert-VerifiableMock.mdx | 7 +++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/versioned_docs/version-v5/commands/Assert-MockCalled.mdx b/versioned_docs/version-v5/commands/Assert-MockCalled.mdx index 461f85f5..d87f6a98 100644 --- a/versioned_docs/version-v5/commands/Assert-MockCalled.mdx +++ b/versioned_docs/version-v5/commands/Assert-MockCalled.mdx @@ -1,7 +1,7 @@ --- id: Assert-MockCalled title: Assert-MockCalled -description: Help for Pester command 'Assert-MockCalled'. {{ Fill in the Synopsis }} +description: Help for Pester command 'Assert-MockCalled'. Checks if a Mocked command has been called a certain number of times and throws an exception if it has not. keywords: - PowerShell - Pester @@ -18,7 +18,11 @@ Contributions are welcome in [Pester-repo](https://github.com/pester/pester). ## SYNOPSIS -\{\{ Fill in the Synopsis \}\} +Checks if a Mocked command has been called a certain number of times +and throws an exception if it has not. + +THIS COMMAND IS OBSOLETE AND WILL BE REMOVED SOMEWHERE DURING v5 LIFETIME, +USE Should -Invoke INSTEAD. ## SYNTAX diff --git a/versioned_docs/version-v5/commands/Assert-VerifiableMock.mdx b/versioned_docs/version-v5/commands/Assert-VerifiableMock.mdx index ffefe7e9..85123fbe 100644 --- a/versioned_docs/version-v5/commands/Assert-VerifiableMock.mdx +++ b/versioned_docs/version-v5/commands/Assert-VerifiableMock.mdx @@ -1,7 +1,7 @@ --- id: Assert-VerifiableMock title: Assert-VerifiableMock -description: Help for Pester command 'Assert-VerifiableMock'. {{ Fill in the Synopsis }} +description: Help for Pester command 'Assert-VerifiableMock'. Checks if all verifiable Mocks has been called at least once. keywords: - PowerShell - Pester @@ -18,7 +18,10 @@ Contributions are welcome in [Pester-repo](https://github.com/pester/pester). ## SYNOPSIS -\{\{ Fill in the Synopsis \}\} +Checks if all verifiable Mocks has been called at least once. + +THIS COMMAND IS OBSOLETE AND WILL BE REMOVED SOMEWHERE DURING v5 LIFETIME, +USE Should -InvokeVerifiable INSTEAD. ## SYNTAX From d1d9f5e35328a2bde1d2b59e919e8deb5512a331 Mon Sep 17 00:00:00 2001 From: Frode Flaten <3436158+fflaten@users.noreply.github.com> Date: Mon, 27 Jul 2026 01:57:11 +0200 Subject: [PATCH 11/17] Apply suggestions from code review Co-authored-by: Frode Flaten <3436158+fflaten@users.noreply.github.com> --- versioned_docs/version-v4/commands/Setup.mdx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/versioned_docs/version-v4/commands/Setup.mdx b/versioned_docs/version-v4/commands/Setup.mdx index 1069c55a..dbf3735d 100644 --- a/versioned_docs/version-v4/commands/Setup.mdx +++ b/versioned_docs/version-v4/commands/Setup.mdx @@ -1,7 +1,7 @@ --- id: Setup title: Setup -description: Help for Pester command 'Setup'. {{ Fill in the Synopsis }} +description: Help for Pester command 'Setup'. This command is included in the Pester Mocking framework for backwards compatibility. You do not need to call it directly. keywords: - PowerShell - Pester @@ -18,7 +18,8 @@ Contributions are welcome in [Pester-repo](https://github.com/pester/pester). ## SYNOPSIS -\{\{ Fill in the Synopsis \}\} +This command is included in the Pester Mocking framework for backwards compatibility. +You do not need to call it directly ## SYNTAX From 75400b8ee6f10da0c9a1168ad8c3b829358fd79a Mon Sep 17 00:00:00 2001 From: Frode Flaten <3436158+fflaten@users.noreply.github.com> Date: Mon, 27 Jul 2026 11:21:08 +0000 Subject: [PATCH 12/17] Update script and use rel-branch repo-links for v4 and v5 --- generate-command-reference.ps1 | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/generate-command-reference.ps1 b/generate-command-reference.ps1 index 45160805..9d52116b 100644 --- a/generate-command-reference.ps1 +++ b/generate-command-reference.ps1 @@ -81,17 +81,34 @@ Write-Host 'Pre-processing CommandHelp-objects' -ForegroundColor Magenta $commandHelp = & { # Workaround: Strict mode breaks PlatyPS (https://github.com/PowerShell/platyPS/issues/800) Set-StrictMode -Off - New-CommandHelp -CommandInfo (Get-Command -Module Pester -CommandType Cmdlet, Function) + New-CommandHelp -CommandInfo (Get-Command -Module Pester -CommandType Cmdlet, Function | Where-Object Version -eq $ModuleList.Pester) } $commandHelp | ForEach-Object { # Customize the description metadata for each command to include the synopsis - # Synopsis is guaranteed by Help.Tests.ps1 in pester/pester-repo, so not checking for "Fill in ..." placeholders - $_.Metadata['description'] = "Help for Pester command '$($_.Title)'. $($_.Synopsis -replace '\s+', ' ')" + # Synopsis is guaranteed by Help.Tests.ps1 in pester/pester-repo, but checking due to platyPS bugs. + if ($_.Synopsis -notmatch '^\{\{ Fill in') { + $_.Metadata['description'] = "Help for Pester command '$($_.Title)'. $($_.Synopsis -replace '\s+', ' ')" + } else { + $_.Metadata['description'] = "Help for Pester command '$($_.Title)'." + } + + # Fix Commands navbar link for v4. This is first command in v4 docs + if ($DocsVersion -eq 'v4' -and $_.Title -eq 'Add-AssertionOperator') { + $_.Metadata['id'] = 'Add-ShouldOperator' # Override id to have common docId for all versions + $_.Metadata['slug'] = $_.Title # Override slug so url still matches v4 name + } } # ----------------------------------------------------------------------------- # Use below settings to manipulate the rendered MDX files # ----------------------------------------------------------------------------- + +$contributeUrl = switch ($DocsVersion) { + 'Current' { 'https://github.com/pester/pester' } + 'v5' { 'https://github.com/pester/Pester/tree/rel/5.x.x' } + 'v4' { 'https://github.com/pester/Pester/tree/rel/4.x.x' } +} + $docusaurusOptions = @{ CommandHelp = $commandHelp DocsFolder = switch ($DocsVersion) { @@ -113,14 +130,14 @@ $docusaurusOptions = @{ 'Help' 'Documentation' ) - PrependMarkdown = @' + PrependMarkdown = @" :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester$(if ($DocsVersion -ne 'Current') { " $DocsVersion" })-repo]($contributeUrl). ::: -'@ +"@ AppendMarkdown = @" ## VERSION -*This page was generated using comment-based help in [Pester $($ModuleList.Pester)](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester $($ModuleList.Pester)]($contributeUrl).* "@ } From 45b6d63d83ee3203c8a05d93a601510b2bf1e33c Mon Sep 17 00:00:00 2001 From: Frode Flaten <3436158+fflaten@users.noreply.github.com> Date: Mon, 27 Jul 2026 11:23:54 +0000 Subject: [PATCH 13/17] Regenerate v4 and v5 docs --- .../version-v4/commands/Add-AssertionOperator.mdx | 8 +++----- versioned_docs/version-v4/commands/AfterAll.mdx | 4 ++-- versioned_docs/version-v4/commands/AfterEach.mdx | 4 ++-- versioned_docs/version-v4/commands/AfterEachFeature.mdx | 4 ++-- versioned_docs/version-v4/commands/AfterEachScenario.mdx | 4 ++-- versioned_docs/version-v4/commands/Assert-MockCalled.mdx | 4 ++-- .../version-v4/commands/Assert-VerifiableMock.mdx | 4 ++-- .../version-v4/commands/Assert-VerifiableMocks.mdx | 4 ++-- versioned_docs/version-v4/commands/BeforeAll.mdx | 4 ++-- versioned_docs/version-v4/commands/BeforeEach.mdx | 4 ++-- versioned_docs/version-v4/commands/BeforeEachFeature.mdx | 4 ++-- versioned_docs/version-v4/commands/BeforeEachScenario.mdx | 4 ++-- versioned_docs/version-v4/commands/Context.mdx | 4 ++-- versioned_docs/version-v4/commands/Describe.mdx | 4 ++-- versioned_docs/version-v4/commands/Find-GherkinStep.mdx | 4 ++-- versioned_docs/version-v4/commands/Get-ShouldOperator.mdx | 4 ++-- versioned_docs/version-v4/commands/Get-TestDriveItem.mdx | 4 ++-- versioned_docs/version-v4/commands/GherkinStep.mdx | 4 ++-- versioned_docs/version-v4/commands/In.mdx | 4 ++-- versioned_docs/version-v4/commands/InModuleScope.mdx | 4 ++-- versioned_docs/version-v4/commands/Invoke-Gherkin.mdx | 4 ++-- versioned_docs/version-v4/commands/Invoke-Pester.mdx | 4 ++-- versioned_docs/version-v4/commands/It.mdx | 4 ++-- versioned_docs/version-v4/commands/Mock.mdx | 4 ++-- versioned_docs/version-v4/commands/New-Fixture.mdx | 4 ++-- versioned_docs/version-v4/commands/New-MockObject.mdx | 4 ++-- versioned_docs/version-v4/commands/New-PesterOption.mdx | 4 ++-- versioned_docs/version-v4/commands/Set-ItResult.mdx | 4 ++-- .../version-v4/commands/Set-TestInconclusive.mdx | 4 ++-- versioned_docs/version-v4/commands/Setup.mdx | 4 ++-- versioned_docs/version-v4/commands/Should.mdx | 4 ++-- versioned_docs/version-v5/commands/Add-ShouldOperator.mdx | 4 ++-- versioned_docs/version-v5/commands/AfterAll.mdx | 4 ++-- versioned_docs/version-v5/commands/AfterEach.mdx | 4 ++-- versioned_docs/version-v5/commands/Assert-MockCalled.mdx | 4 ++-- .../version-v5/commands/Assert-VerifiableMock.mdx | 4 ++-- versioned_docs/version-v5/commands/BeforeAll.mdx | 4 ++-- versioned_docs/version-v5/commands/BeforeDiscovery.mdx | 4 ++-- versioned_docs/version-v5/commands/BeforeEach.mdx | 4 ++-- versioned_docs/version-v5/commands/Context.mdx | 4 ++-- .../version-v5/commands/ConvertTo-JUnitReport.mdx | 4 ++-- .../version-v5/commands/ConvertTo-NUnitReport.mdx | 4 ++-- .../version-v5/commands/ConvertTo-Pester4Result.mdx | 4 ++-- versioned_docs/version-v5/commands/Describe.mdx | 4 ++-- versioned_docs/version-v5/commands/Export-JUnitReport.mdx | 4 ++-- versioned_docs/version-v5/commands/Export-NUnitReport.mdx | 4 ++-- versioned_docs/version-v5/commands/Get-ShouldOperator.mdx | 4 ++-- versioned_docs/version-v5/commands/InModuleScope.mdx | 4 ++-- versioned_docs/version-v5/commands/Invoke-Pester.mdx | 4 ++-- versioned_docs/version-v5/commands/It.mdx | 4 ++-- versioned_docs/version-v5/commands/Mock.mdx | 4 ++-- versioned_docs/version-v5/commands/New-Fixture.mdx | 4 ++-- versioned_docs/version-v5/commands/New-MockObject.mdx | 4 ++-- .../version-v5/commands/New-PesterConfiguration.mdx | 4 ++-- .../version-v5/commands/New-PesterContainer.mdx | 4 ++-- versioned_docs/version-v5/commands/Set-ItResult.mdx | 4 ++-- versioned_docs/version-v5/commands/Should.mdx | 4 ++-- 57 files changed, 115 insertions(+), 117 deletions(-) diff --git a/versioned_docs/version-v4/commands/Add-AssertionOperator.mdx b/versioned_docs/version-v4/commands/Add-AssertionOperator.mdx index 0bcdf62d..361b6f35 100644 --- a/versioned_docs/version-v4/commands/Add-AssertionOperator.mdx +++ b/versioned_docs/version-v4/commands/Add-AssertionOperator.mdx @@ -1,8 +1,5 @@ --- -# Override id to have common docId for Commands navbar-link for all versions id: Add-ShouldOperator -# Override slug so url matches v4 name -slug: Add-AssertionOperator title: Add-AssertionOperator description: Help for Pester command 'Add-AssertionOperator'. Register an Assertion Operator with Pester keywords: @@ -13,10 +10,11 @@ keywords: hide_title: false hide_table_of_contents: false custom_edit_url: null +slug: Add-AssertionOperator --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). ::: ## SYNOPSIS @@ -197,4 +195,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/Pester/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/AfterAll.mdx b/versioned_docs/version-v4/commands/AfterAll.mdx index c075145b..2cc2a590 100644 --- a/versioned_docs/version-v4/commands/AfterAll.mdx +++ b/versioned_docs/version-v4/commands/AfterAll.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). ::: ## SYNOPSIS @@ -85,4 +85,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/Pester/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/AfterEach.mdx b/versioned_docs/version-v4/commands/AfterEach.mdx index bb674291..701eb1c4 100644 --- a/versioned_docs/version-v4/commands/AfterEach.mdx +++ b/versioned_docs/version-v4/commands/AfterEach.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). ::: ## SYNOPSIS @@ -88,4 +88,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/Pester/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/AfterEachFeature.mdx b/versioned_docs/version-v4/commands/AfterEachFeature.mdx index b7555744..d33c5f3c 100644 --- a/versioned_docs/version-v4/commands/AfterEachFeature.mdx +++ b/versioned_docs/version-v4/commands/AfterEachFeature.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). ::: ## SYNOPSIS @@ -123,4 +123,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/Pester/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/AfterEachScenario.mdx b/versioned_docs/version-v4/commands/AfterEachScenario.mdx index 9d57f1c7..3b17b5e5 100644 --- a/versioned_docs/version-v4/commands/AfterEachScenario.mdx +++ b/versioned_docs/version-v4/commands/AfterEachScenario.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). ::: ## SYNOPSIS @@ -123,4 +123,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/Pester/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/Assert-MockCalled.mdx b/versioned_docs/version-v4/commands/Assert-MockCalled.mdx index 18596832..3226bab7 100644 --- a/versioned_docs/version-v4/commands/Assert-MockCalled.mdx +++ b/versioned_docs/version-v4/commands/Assert-MockCalled.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). ::: ## SYNOPSIS @@ -356,4 +356,4 @@ to the original. ## VERSION -*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/Pester/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/Assert-VerifiableMock.mdx b/versioned_docs/version-v4/commands/Assert-VerifiableMock.mdx index 3728175d..1bfeaf2e 100644 --- a/versioned_docs/version-v4/commands/Assert-VerifiableMock.mdx +++ b/versioned_docs/version-v4/commands/Assert-VerifiableMock.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). ::: ## SYNOPSIS @@ -84,4 +84,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/Pester/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/Assert-VerifiableMocks.mdx b/versioned_docs/version-v4/commands/Assert-VerifiableMocks.mdx index 2149902a..9a5af08c 100644 --- a/versioned_docs/version-v4/commands/Assert-VerifiableMocks.mdx +++ b/versioned_docs/version-v4/commands/Assert-VerifiableMocks.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). ::: ## SYNOPSIS @@ -64,4 +64,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/Pester/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/BeforeAll.mdx b/versioned_docs/version-v4/commands/BeforeAll.mdx index b6d85e81..7ec21dae 100644 --- a/versioned_docs/version-v4/commands/BeforeAll.mdx +++ b/versioned_docs/version-v4/commands/BeforeAll.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). ::: ## SYNOPSIS @@ -85,4 +85,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/Pester/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/BeforeEach.mdx b/versioned_docs/version-v4/commands/BeforeEach.mdx index ce801fa8..376cd27c 100644 --- a/versioned_docs/version-v4/commands/BeforeEach.mdx +++ b/versioned_docs/version-v4/commands/BeforeEach.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). ::: ## SYNOPSIS @@ -88,4 +88,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/Pester/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/BeforeEachFeature.mdx b/versioned_docs/version-v4/commands/BeforeEachFeature.mdx index cfc8b915..422d9c2e 100644 --- a/versioned_docs/version-v4/commands/BeforeEachFeature.mdx +++ b/versioned_docs/version-v4/commands/BeforeEachFeature.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). ::: ## SYNOPSIS @@ -123,4 +123,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/Pester/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/BeforeEachScenario.mdx b/versioned_docs/version-v4/commands/BeforeEachScenario.mdx index 3fa14fab..2ab7d0f9 100644 --- a/versioned_docs/version-v4/commands/BeforeEachScenario.mdx +++ b/versioned_docs/version-v4/commands/BeforeEachScenario.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). ::: ## SYNOPSIS @@ -125,4 +125,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/Pester/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/Context.mdx b/versioned_docs/version-v4/commands/Context.mdx index 937176c0..7c3499fd 100644 --- a/versioned_docs/version-v4/commands/Context.mdx +++ b/versioned_docs/version-v4/commands/Context.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). ::: ## SYNOPSIS @@ -158,4 +158,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/Pester/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/Describe.mdx b/versioned_docs/version-v4/commands/Describe.mdx index 494fba8f..90c6e106 100644 --- a/versioned_docs/version-v4/commands/Describe.mdx +++ b/versioned_docs/version-v4/commands/Describe.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). ::: ## SYNOPSIS @@ -168,4 +168,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/Pester/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/Find-GherkinStep.mdx b/versioned_docs/version-v4/commands/Find-GherkinStep.mdx index c71afae0..8f209765 100644 --- a/versioned_docs/version-v4/commands/Find-GherkinStep.mdx +++ b/versioned_docs/version-v4/commands/Find-GherkinStep.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). ::: ## SYNOPSIS @@ -104,4 +104,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/Pester/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/Get-ShouldOperator.mdx b/versioned_docs/version-v4/commands/Get-ShouldOperator.mdx index 282189aa..c5ee5531 100644 --- a/versioned_docs/version-v4/commands/Get-ShouldOperator.mdx +++ b/versioned_docs/version-v4/commands/Get-ShouldOperator.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). ::: ## SYNOPSIS @@ -98,4 +98,4 @@ standard PowerShell discovery patterns (like `Get-Help Should -Parameter *`). ## VERSION -*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/Pester/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/Get-TestDriveItem.mdx b/versioned_docs/version-v4/commands/Get-TestDriveItem.mdx index 294e9f6c..d447e730 100644 --- a/versioned_docs/version-v4/commands/Get-TestDriveItem.mdx +++ b/versioned_docs/version-v4/commands/Get-TestDriveItem.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). ::: ## SYNOPSIS @@ -87,4 +87,4 @@ HelpMessage: '' ## VERSION -*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/Pester/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/GherkinStep.mdx b/versioned_docs/version-v4/commands/GherkinStep.mdx index af11f6fc..78164d16 100644 --- a/versioned_docs/version-v4/commands/GherkinStep.mdx +++ b/versioned_docs/version-v4/commands/GherkinStep.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). ::: ## SYNOPSIS @@ -159,4 +159,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/Pester/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/In.mdx b/versioned_docs/version-v4/commands/In.mdx index f66978e2..005597f3 100644 --- a/versioned_docs/version-v4/commands/In.mdx +++ b/versioned_docs/version-v4/commands/In.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). ::: ## SYNOPSIS @@ -105,4 +105,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/Pester/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/InModuleScope.mdx b/versioned_docs/version-v4/commands/InModuleScope.mdx index b805538e..136f6e92 100644 --- a/versioned_docs/version-v4/commands/InModuleScope.mdx +++ b/versioned_docs/version-v4/commands/InModuleScope.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). ::: ## SYNOPSIS @@ -138,4 +138,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/Pester/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/Invoke-Gherkin.mdx b/versioned_docs/version-v4/commands/Invoke-Gherkin.mdx index 02e58ad6..ee67ad8f 100644 --- a/versioned_docs/version-v4/commands/Invoke-Gherkin.mdx +++ b/versioned_docs/version-v4/commands/Invoke-Gherkin.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). ::: ## SYNOPSIS @@ -474,4 +474,4 @@ https://kevinmarquette.github.io/2017-03-17-Powershell-Gherkin-specification-val ## VERSION -*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/Pester/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/Invoke-Pester.mdx b/versioned_docs/version-v4/commands/Invoke-Pester.mdx index f033fb36..6b28d73d 100644 --- a/versioned_docs/version-v4/commands/Invoke-Pester.mdx +++ b/versioned_docs/version-v4/commands/Invoke-Pester.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). ::: ## SYNOPSIS @@ -781,4 +781,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/Pester/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/It.mdx b/versioned_docs/version-v4/commands/It.mdx index ff4efa19..b8330ab3 100644 --- a/versioned_docs/version-v4/commands/It.mdx +++ b/versioned_docs/version-v4/commands/It.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). ::: ## SYNOPSIS @@ -263,4 +263,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/Pester/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/Mock.mdx b/versioned_docs/version-v4/commands/Mock.mdx index 89fca279..27cc8fc1 100644 --- a/versioned_docs/version-v4/commands/Mock.mdx +++ b/versioned_docs/version-v4/commands/Mock.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). ::: ## SYNOPSIS @@ -394,4 +394,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/Pester/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/New-Fixture.mdx b/versioned_docs/version-v4/commands/New-Fixture.mdx index 63744540..562c13e8 100644 --- a/versioned_docs/version-v4/commands/New-Fixture.mdx +++ b/versioned_docs/version-v4/commands/New-Fixture.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). ::: ## SYNOPSIS @@ -147,4 +147,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/Pester/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/New-MockObject.mdx b/versioned_docs/version-v4/commands/New-MockObject.mdx index d0ee9e1b..4b7aa440 100644 --- a/versioned_docs/version-v4/commands/New-MockObject.mdx +++ b/versioned_docs/version-v4/commands/New-MockObject.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). ::: ## SYNOPSIS @@ -82,4 +82,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/Pester/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/New-PesterOption.mdx b/versioned_docs/version-v4/commands/New-PesterOption.mdx index af6e2a8c..8030dfdb 100644 --- a/versioned_docs/version-v4/commands/New-PesterOption.mdx +++ b/versioned_docs/version-v4/commands/New-PesterOption.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). ::: ## SYNOPSIS @@ -182,4 +182,4 @@ You cannot pipe input to this command. ## VERSION -*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/Pester/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/Set-ItResult.mdx b/versioned_docs/version-v4/commands/Set-ItResult.mdx index f5fe7e40..4bd5231e 100644 --- a/versioned_docs/version-v4/commands/Set-ItResult.mdx +++ b/versioned_docs/version-v4/commands/Set-ItResult.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). ::: ## SYNOPSIS @@ -193,4 +193,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/Pester/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/Set-TestInconclusive.mdx b/versioned_docs/version-v4/commands/Set-TestInconclusive.mdx index 173c7986..67ffd137 100644 --- a/versioned_docs/version-v4/commands/Set-TestInconclusive.mdx +++ b/versioned_docs/version-v4/commands/Set-TestInconclusive.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). ::: ## SYNOPSIS @@ -90,4 +90,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/Pester/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/Setup.mdx b/versioned_docs/version-v4/commands/Setup.mdx index dbf3735d..02f06e1a 100644 --- a/versioned_docs/version-v4/commands/Setup.mdx +++ b/versioned_docs/version-v4/commands/Setup.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). ::: ## SYNOPSIS @@ -158,4 +158,4 @@ HelpMessage: '' ## VERSION -*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/Pester/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/Should.mdx b/versioned_docs/version-v4/commands/Should.mdx index 97f9f6fd..3ef970a3 100644 --- a/versioned_docs/version-v4/commands/Should.mdx +++ b/versioned_docs/version-v4/commands/Should.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). ::: ## SYNOPSIS @@ -1452,4 +1452,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/Pester/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v5/commands/Add-ShouldOperator.mdx b/versioned_docs/version-v5/commands/Add-ShouldOperator.mdx index a843da68..3598db70 100644 --- a/versioned_docs/version-v5/commands/Add-ShouldOperator.mdx +++ b/versioned_docs/version-v5/commands/Add-ShouldOperator.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -194,4 +194,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/AfterAll.mdx b/versioned_docs/version-v5/commands/AfterAll.mdx index 9ff34ad1..45f471e7 100644 --- a/versioned_docs/version-v5/commands/AfterAll.mdx +++ b/versioned_docs/version-v5/commands/AfterAll.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -114,4 +114,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/AfterEach.mdx b/versioned_docs/version-v5/commands/AfterEach.mdx index 74ae869c..2a237c8d 100644 --- a/versioned_docs/version-v5/commands/AfterEach.mdx +++ b/versioned_docs/version-v5/commands/AfterEach.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -111,4 +111,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Assert-MockCalled.mdx b/versioned_docs/version-v5/commands/Assert-MockCalled.mdx index d87f6a98..df680dfc 100644 --- a/versioned_docs/version-v5/commands/Assert-MockCalled.mdx +++ b/versioned_docs/version-v5/commands/Assert-MockCalled.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -222,4 +222,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Assert-VerifiableMock.mdx b/versioned_docs/version-v5/commands/Assert-VerifiableMock.mdx index 85123fbe..776fdf94 100644 --- a/versioned_docs/version-v5/commands/Assert-VerifiableMock.mdx +++ b/versioned_docs/version-v5/commands/Assert-VerifiableMock.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -64,4 +64,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/BeforeAll.mdx b/versioned_docs/version-v5/commands/BeforeAll.mdx index 2695957a..d3577124 100644 --- a/versioned_docs/version-v5/commands/BeforeAll.mdx +++ b/versioned_docs/version-v5/commands/BeforeAll.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -123,4 +123,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/BeforeDiscovery.mdx b/versioned_docs/version-v5/commands/BeforeDiscovery.mdx index 8b2e2bec..42db4814 100644 --- a/versioned_docs/version-v5/commands/BeforeDiscovery.mdx +++ b/versioned_docs/version-v5/commands/BeforeDiscovery.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -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.9.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/BeforeEach.mdx b/versioned_docs/version-v5/commands/BeforeEach.mdx index 1f8c153a..6d37f92e 100644 --- a/versioned_docs/version-v5/commands/BeforeEach.mdx +++ b/versioned_docs/version-v5/commands/BeforeEach.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -108,4 +108,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Context.mdx b/versioned_docs/version-v5/commands/Context.mdx index db74affd..461dc243 100644 --- a/versioned_docs/version-v5/commands/Context.mdx +++ b/versioned_docs/version-v5/commands/Context.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -208,4 +208,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/ConvertTo-JUnitReport.mdx b/versioned_docs/version-v5/commands/ConvertTo-JUnitReport.mdx index ee5b2623..49f64de9 100644 --- a/versioned_docs/version-v5/commands/ConvertTo-JUnitReport.mdx +++ b/versioned_docs/version-v5/commands/ConvertTo-JUnitReport.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -132,4 +132,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/ConvertTo-NUnitReport.mdx b/versioned_docs/version-v5/commands/ConvertTo-NUnitReport.mdx index a37f4e2f..a6c64ef4 100644 --- a/versioned_docs/version-v5/commands/ConvertTo-NUnitReport.mdx +++ b/versioned_docs/version-v5/commands/ConvertTo-NUnitReport.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -164,4 +164,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/ConvertTo-Pester4Result.mdx b/versioned_docs/version-v5/commands/ConvertTo-Pester4Result.mdx index 0d68fdb3..aa5d83db 100644 --- a/versioned_docs/version-v5/commands/ConvertTo-Pester4Result.mdx +++ b/versioned_docs/version-v5/commands/ConvertTo-Pester4Result.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -95,4 +95,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Describe.mdx b/versioned_docs/version-v5/commands/Describe.mdx index fc412986..ef9e43b4 100644 --- a/versioned_docs/version-v5/commands/Describe.mdx +++ b/versioned_docs/version-v5/commands/Describe.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -218,4 +218,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Export-JUnitReport.mdx b/versioned_docs/version-v5/commands/Export-JUnitReport.mdx index 21555ecc..db0e5e2a 100644 --- a/versioned_docs/version-v5/commands/Export-JUnitReport.mdx +++ b/versioned_docs/version-v5/commands/Export-JUnitReport.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -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.9.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Export-NUnitReport.mdx b/versioned_docs/version-v5/commands/Export-NUnitReport.mdx index 244cb865..49398458 100644 --- a/versioned_docs/version-v5/commands/Export-NUnitReport.mdx +++ b/versioned_docs/version-v5/commands/Export-NUnitReport.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -140,4 +140,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Get-ShouldOperator.mdx b/versioned_docs/version-v5/commands/Get-ShouldOperator.mdx index 32d2f50f..34bb4a67 100644 --- a/versioned_docs/version-v5/commands/Get-ShouldOperator.mdx +++ b/versioned_docs/version-v5/commands/Get-ShouldOperator.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -101,4 +101,4 @@ standard PowerShell discovery patterns (like `Get-Help Should -Parameter *`). ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/InModuleScope.mdx b/versioned_docs/version-v5/commands/InModuleScope.mdx index cb2d1ac6..8021c2b8 100644 --- a/versioned_docs/version-v5/commands/InModuleScope.mdx +++ b/versioned_docs/version-v5/commands/InModuleScope.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -229,4 +229,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Invoke-Pester.mdx b/versioned_docs/version-v5/commands/Invoke-Pester.mdx index 223bfcac..7383648c 100644 --- a/versioned_docs/version-v5/commands/Invoke-Pester.mdx +++ b/versioned_docs/version-v5/commands/Invoke-Pester.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -785,4 +785,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/It.mdx b/versioned_docs/version-v5/commands/It.mdx index 04f69c2c..4ec745d9 100644 --- a/versioned_docs/version-v5/commands/It.mdx +++ b/versioned_docs/version-v5/commands/It.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -291,4 +291,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Mock.mdx b/versioned_docs/version-v5/commands/Mock.mdx index b4976af7..64b3ee54 100644 --- a/versioned_docs/version-v5/commands/Mock.mdx +++ b/versioned_docs/version-v5/commands/Mock.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -376,4 +376,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/New-Fixture.mdx b/versioned_docs/version-v5/commands/New-Fixture.mdx index 1f770d81..b3e30ad4 100644 --- a/versioned_docs/version-v5/commands/New-Fixture.mdx +++ b/versioned_docs/version-v5/commands/New-Fixture.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -151,4 +151,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/New-MockObject.mdx b/versioned_docs/version-v5/commands/New-MockObject.mdx index d138a9cf..acdff9a4 100644 --- a/versioned_docs/version-v5/commands/New-MockObject.mdx +++ b/versioned_docs/version-v5/commands/New-MockObject.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -249,4 +249,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/New-PesterConfiguration.mdx b/versioned_docs/version-v5/commands/New-PesterConfiguration.mdx index 86525b9f..1408e3e1 100644 --- a/versioned_docs/version-v5/commands/New-PesterConfiguration.mdx +++ b/versioned_docs/version-v5/commands/New-PesterConfiguration.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -125,4 +125,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/New-PesterContainer.mdx b/versioned_docs/version-v5/commands/New-PesterContainer.mdx index 0cb9f47c..eabe5228 100644 --- a/versioned_docs/version-v5/commands/New-PesterContainer.mdx +++ b/versioned_docs/version-v5/commands/New-PesterContainer.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -168,4 +168,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Set-ItResult.mdx b/versioned_docs/version-v5/commands/Set-ItResult.mdx index 8f971c91..fdd77bb7 100644 --- a/versioned_docs/version-v5/commands/Set-ItResult.mdx +++ b/versioned_docs/version-v5/commands/Set-ItResult.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -186,4 +186,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Should.mdx b/versioned_docs/version-v5/commands/Should.mdx index de8dbbe2..20a55999 100644 --- a/versioned_docs/version-v5/commands/Should.mdx +++ b/versioned_docs/version-v5/commands/Should.mdx @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -1791,4 +1791,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* From b9de037da9e386419f909545d4b9bad1913ccfc1 Mon Sep 17 00:00:00 2001 From: Frode Flaten <3436158+fflaten@users.noreply.github.com> Date: Tue, 11 Aug 2026 19:52:51 +0000 Subject: [PATCH 14/17] Update to Pester 6.1.0 and 5.9.1 --- 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 | 251 ++++++++++++++++++ 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 | 35 ++- docs/commands/Should-BeTrue.mdx | 6 +- docs/commands/Should-BeTruthy.mdx | 6 +- docs/commands/Should-ContainCollection.mdx | 41 ++- 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 | 52 +++- .../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 + .../commands/Add-ShouldOperator.mdx | 2 +- .../version-v5/commands/AfterAll.mdx | 2 +- .../version-v5/commands/AfterEach.mdx | 2 +- .../version-v5/commands/Assert-MockCalled.mdx | 2 +- .../commands/Assert-VerifiableMock.mdx | 2 +- .../version-v5/commands/BeforeAll.mdx | 2 +- .../version-v5/commands/BeforeDiscovery.mdx | 2 +- .../version-v5/commands/BeforeEach.mdx | 2 +- .../version-v5/commands/Context.mdx | 2 +- .../commands/ConvertTo-JUnitReport.mdx | 2 +- .../commands/ConvertTo-NUnitReport.mdx | 2 +- .../commands/ConvertTo-Pester4Result.mdx | 2 +- .../version-v5/commands/Describe.mdx | 2 +- .../commands/Export-JUnitReport.mdx | 2 +- .../commands/Export-NUnitReport.mdx | 2 +- .../commands/Get-ShouldOperator.mdx | 2 +- .../version-v5/commands/InModuleScope.mdx | 2 +- .../version-v5/commands/Invoke-Pester.mdx | 2 +- versioned_docs/version-v5/commands/It.mdx | 2 +- versioned_docs/version-v5/commands/Mock.mdx | 2 +- .../version-v5/commands/New-Fixture.mdx | 2 +- .../version-v5/commands/New-MockObject.mdx | 2 +- .../commands/New-PesterConfiguration.mdx | 2 +- .../commands/New-PesterContainer.mdx | 2 +- .../version-v5/commands/Set-ItResult.mdx | 2 +- versioned_docs/version-v5/commands/Should.mdx | 2 +- 93 files changed, 539 insertions(+), 120 deletions(-) create mode 100644 docs/commands/New-ShouldAssertion.mdx diff --git a/docs/commands/Add-ShouldOperator.mdx b/docs/commands/Add-ShouldOperator.mdx index 7ec0625b..8a8c7b2a 100644 --- a/docs/commands/Add-ShouldOperator.mdx +++ b/docs/commands/Add-ShouldOperator.mdx @@ -194,4 +194,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0](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 b2b95786..d5082162 100644 --- a/docs/commands/AfterAll.mdx +++ b/docs/commands/AfterAll.mdx @@ -114,4 +114,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0](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 98380ebd..3806a6b7 100644 --- a/docs/commands/AfterEach.mdx +++ b/docs/commands/AfterEach.mdx @@ -111,4 +111,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0](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 a4b61aaf..6724919b 100644 --- a/docs/commands/BeforeAll.mdx +++ b/docs/commands/BeforeAll.mdx @@ -123,4 +123,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0](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 f88a8ef0..a35b1d3d 100644 --- a/docs/commands/BeforeDiscovery.mdx +++ b/docs/commands/BeforeDiscovery.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](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 f3b3ad21..ac9cff21 100644 --- a/docs/commands/BeforeEach.mdx +++ b/docs/commands/BeforeEach.mdx @@ -108,4 +108,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0](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 a51631ee..9930f77b 100644 --- a/docs/commands/Context.mdx +++ b/docs/commands/Context.mdx @@ -231,4 +231,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0](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 e75f9ae3..e51289a5 100644 --- a/docs/commands/ConvertTo-JUnitReport.mdx +++ b/docs/commands/ConvertTo-JUnitReport.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](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 981465cb..9580f92d 100644 --- a/docs/commands/ConvertTo-NUnitReport.mdx +++ b/docs/commands/ConvertTo-NUnitReport.mdx @@ -168,4 +168,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0](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 a8c39efc..cd8c3500 100644 --- a/docs/commands/ConvertTo-Pester4Result.mdx +++ b/docs/commands/ConvertTo-Pester4Result.mdx @@ -95,4 +95,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0](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 52a1eb7a..19ef5d02 100644 --- a/docs/commands/Describe.mdx +++ b/docs/commands/Describe.mdx @@ -241,4 +241,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0](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 a8892d77..75cf74b8 100644 --- a/docs/commands/Export-JUnitReport.mdx +++ b/docs/commands/Export-JUnitReport.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 6.0.0](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 108f76d8..df4bb071 100644 --- a/docs/commands/Export-NUnitReport.mdx +++ b/docs/commands/Export-NUnitReport.mdx @@ -140,4 +140,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0](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 b75b6ae5..e2502f46 100644 --- a/docs/commands/Get-ShouldOperator.mdx +++ b/docs/commands/Get-ShouldOperator.mdx @@ -101,4 +101,4 @@ standard PowerShell discovery patterns (like `Get-Help Should -Parameter *`). ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0](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 e83d321a..2805b30b 100644 --- a/docs/commands/InModuleScope.mdx +++ b/docs/commands/InModuleScope.mdx @@ -229,4 +229,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0](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 63b3e852..3dff1748 100644 --- a/docs/commands/Invoke-Pester.mdx +++ b/docs/commands/Invoke-Pester.mdx @@ -382,4 +382,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0](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 5286d519..6c369e8c 100644 --- a/docs/commands/It.mdx +++ b/docs/commands/It.mdx @@ -284,4 +284,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0](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 ea15e291..f56e9d75 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 @@ -214,6 +246,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: System.Management.Automation.ScriptBlock @@ -239,6 +276,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: System.String @@ -375,4 +416,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0](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 af702794..4308b349 100644 --- a/docs/commands/New-Fixture.mdx +++ b/docs/commands/New-Fixture.mdx @@ -153,4 +153,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0](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 30aa709d..f4f2311c 100644 --- a/docs/commands/New-MockObject.mdx +++ b/docs/commands/New-MockObject.mdx @@ -249,4 +249,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0](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 6cf8562e..a9b2b27b 100644 --- a/docs/commands/New-PesterConfiguration.mdx +++ b/docs/commands/New-PesterConfiguration.mdx @@ -127,4 +127,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0](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 67a4c93c..a559579f 100644 --- a/docs/commands/New-PesterContainer.mdx +++ b/docs/commands/New-PesterContainer.mdx @@ -170,4 +170,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0](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..c33166a4 --- /dev/null +++ b/docs/commands/New-ShouldAssertion.mdx @@ -0,0 +1,251 @@ +--- +id: New-ShouldAssertion +title: New-ShouldAssertion +description: Help for Pester command 'New-ShouldAssertion'. Creates the assertion helper object used to author custom `Should-*` assertions. +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 + +### -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: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -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: System.String +DefaultValue: Scalar +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -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: System.Object[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -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: System.Management.Automation.PSCmdlet +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### CommonParameters + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://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 f5cdeed6..54308cd7 100644 --- a/docs/commands/Set-ItResult.mdx +++ b/docs/commands/Set-ItResult.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](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 b349f582..df8cfca8 100644 --- a/docs/commands/Should-All.mdx +++ b/docs/commands/Should-All.mdx @@ -145,4 +145,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](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 876323c5..97a07d7d 100644 --- a/docs/commands/Should-Any.mdx +++ b/docs/commands/Should-Any.mdx @@ -146,4 +146,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](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 a8cbdf17..693deba4 100644 --- a/docs/commands/Should-Be.mdx +++ b/docs/commands/Should-Be.mdx @@ -135,4 +135,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](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 271ae26d..c6da379a 100644 --- a/docs/commands/Should-BeAfter.mdx +++ b/docs/commands/Should-BeAfter.mdx @@ -98,7 +98,7 @@ SupportsWildcards: false Aliases: [] ParameterSets: - Name: (All) - Position: 2 + Position: 1 IsRequired: false ValueFromPipeline: true ValueFromPipelineByPropertyName: false @@ -272,4 +272,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](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 b09849ca..bd2bd9d8 100644 --- a/docs/commands/Should-BeBefore.mdx +++ b/docs/commands/Should-BeBefore.mdx @@ -98,7 +98,7 @@ SupportsWildcards: false Aliases: [] ParameterSets: - Name: (All) - Position: 2 + Position: 1 IsRequired: false ValueFromPipeline: true ValueFromPipelineByPropertyName: false @@ -272,4 +272,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](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 185d5dd0..46d56855 100644 --- a/docs/commands/Should-BeCollection.mdx +++ b/docs/commands/Should-BeCollection.mdx @@ -176,4 +176,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](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 1700d6f2..a172002c 100644 --- a/docs/commands/Should-BeEmptyString.mdx +++ b/docs/commands/Should-BeEmptyString.mdx @@ -134,4 +134,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](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 ebfcf5f8..37e94ade 100644 --- a/docs/commands/Should-BeEquivalent.mdx +++ b/docs/commands/Should-BeEquivalent.mdx @@ -244,4 +244,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](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 1aa59de8..4b1c5d27 100644 --- a/docs/commands/Should-BeFalse.mdx +++ b/docs/commands/Should-BeFalse.mdx @@ -23,7 +23,7 @@ Compares the actual value to a boolean $false. It does not convert input values ## SYNTAX ```powershell -Should-BeFalse [[-Actual] ] [[-Because] ] +Should-BeFalse [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -88,7 +88,7 @@ SupportsWildcards: false Aliases: [] ParameterSets: - Name: (All) - Position: 1 + Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false @@ -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](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 b75e5229..8f916333 100644 --- a/docs/commands/Should-BeFalsy.mdx +++ b/docs/commands/Should-BeFalsy.mdx @@ -23,7 +23,7 @@ Compares the actual value to a boolean $false or a falsy value: 0, "", $null or ## SYNTAX ```powershell -Should-BeFalsy [[-Actual] ] [[-Because] ] +Should-BeFalsy [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -88,7 +88,7 @@ SupportsWildcards: false Aliases: [] ParameterSets: - Name: (All) - Position: 1 + Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false @@ -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](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 d88fb34a..fe323e4c 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 [[-Expected] ] [[-Actual] ] [-Because ] +Should-BeFasterThan [-Expected] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -105,7 +105,7 @@ Aliases: [] ParameterSets: - Name: (All) Position: 0 - IsRequired: false + IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: false @@ -144,4 +144,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](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 933f91c8..89fb61b8 100644 --- a/docs/commands/Should-BeGreaterThan.mdx +++ b/docs/commands/Should-BeGreaterThan.mdx @@ -134,4 +134,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](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 3267f92e..878bd080 100644 --- a/docs/commands/Should-BeGreaterThanOrEqual.mdx +++ b/docs/commands/Should-BeGreaterThanOrEqual.mdx @@ -134,4 +134,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](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 91d9059b..0a33a8d3 100644 --- a/docs/commands/Should-BeHashtable.mdx +++ b/docs/commands/Should-BeHashtable.mdx @@ -96,7 +96,7 @@ SupportsWildcards: false Aliases: [] ParameterSets: - Name: (All) - Position: 1 + Position: 0 IsRequired: false ValueFromPipeline: true ValueFromPipelineByPropertyName: false @@ -228,4 +228,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](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 32db5452..e753498b 100644 --- a/docs/commands/Should-BeLessThan.mdx +++ b/docs/commands/Should-BeLessThan.mdx @@ -134,4 +134,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](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 eac8902d..d62cc5c2 100644 --- a/docs/commands/Should-BeLessThanOrEqual.mdx +++ b/docs/commands/Should-BeLessThanOrEqual.mdx @@ -144,4 +144,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](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 bb2f274e..bbffd0f8 100644 --- a/docs/commands/Should-BeLikeString.mdx +++ b/docs/commands/Should-BeLikeString.mdx @@ -165,4 +165,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](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 558b16db..827cf696 100644 --- a/docs/commands/Should-BeNull.mdx +++ b/docs/commands/Should-BeNull.mdx @@ -54,7 +54,7 @@ SupportsWildcards: false Aliases: [] ParameterSets: - Name: (All) - Position: 1 + Position: 0 IsRequired: false ValueFromPipeline: true ValueFromPipelineByPropertyName: false @@ -113,4 +113,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](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 c9d89cfb..42919b93 100644 --- a/docs/commands/Should-BeSame.mdx +++ b/docs/commands/Should-BeSame.mdx @@ -147,4 +147,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](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 f7ff6686..0a1ef6f6 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 [[-Expected] ] [[-Actual] ] [-Because ] +Should-BeSlowerThan [-Expected] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -113,7 +113,7 @@ Aliases: [] ParameterSets: - Name: (All) Position: 0 - IsRequired: false + IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: false @@ -152,4 +152,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](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 6fd24ab1..7e808897 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 [-Expected] [[-Actual] ] [-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 @@ -157,6 +165,29 @@ AcceptedValues: [] HelpMessage: '' ``` +### -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: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + ### -TrimWhitespace Trims whitespace at the start and end of the string. @@ -208,4 +239,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](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 08ea8465..c1c631c6 100644 --- a/docs/commands/Should-BeTrue.mdx +++ b/docs/commands/Should-BeTrue.mdx @@ -23,7 +23,7 @@ Compares the actual value to a boolean $true. It does not convert input values t ## SYNTAX ```powershell -Should-BeTrue [[-Actual] ] [[-Because] ] +Should-BeTrue [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -88,7 +88,7 @@ SupportsWildcards: false Aliases: [] ParameterSets: - Name: (All) - Position: 1 + Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false @@ -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](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 42c00b85..39f59cda 100644 --- a/docs/commands/Should-BeTruthy.mdx +++ b/docs/commands/Should-BeTruthy.mdx @@ -23,7 +23,7 @@ Compares the actual value to a boolean $true. It converts input values to boolea ## SYNTAX ```powershell -Should-BeTruthy [[-Actual] ] [[-Because] ] +Should-BeTruthy [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -89,7 +89,7 @@ SupportsWildcards: false Aliases: [] ParameterSets: - Name: (All) - Position: 1 + Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false @@ -129,4 +129,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](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 760fb904..9986ec8a 100644 --- a/docs/commands/Should-ContainCollection.mdx +++ b/docs/commands/Should-ContainCollection.mdx @@ -23,7 +23,8 @@ Checks that the expected collection is present in the actual collection as an or ## SYNTAX ```powershell -Should-ContainCollection [-Expected] [[-Actual] ] [-Because ] +Should-ContainCollection [-Expected] [[-Actual] ] [-IgnoreOrder] + [-Because ] ``` ## DESCRIPTION @@ -33,6 +34,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 @@ -49,6 +53,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) @@ -104,7 +117,8 @@ HelpMessage: '' ### -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 @@ -124,6 +138,27 @@ AcceptedValues: [] HelpMessage: '' ``` +### -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: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, @@ -152,4 +187,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](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 9ab5eb9b..fd18c2c8 100644 --- a/docs/commands/Should-HaveParameter.mdx +++ b/docs/commands/Should-HaveParameter.mdx @@ -314,4 +314,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](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 b93a043b..0b8c7a6d 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 [-Expected] [[-Actual] ] [-Because ] +Should-HaveType [-Expected] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -31,6 +31,9 @@ Should-HaveType [-Expected] [[-Actual] ] [-Because ] This assertion uses `-is` to verify that the actual value is assignable to the expected type. Derived types and implemented interfaces also satisfy the check. +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`. +This allows asserting against PowerShell custom types, such as objects tagged with a `PSTypeName` or extended with `Add-Member -TypeName`. + ## EXAMPLES ### EXAMPLE 1 @@ -42,6 +45,15 @@ Derived types and implemented interfaces also satisfy the check. These assertions will pass, because the actual value is of the expected type. +### EXAMPLE 2 + +```powershell +$actual = [PSCustomObject]@{ PSTypeName = 'MyApp.Person'; Name = 'Jane' } +$actual | Should-HaveType 'MyApp.Person' +``` + +This assertion will pass, because 'MyApp.Person' is not a loaded .NET type, so the actual value's PSTypeNames are checked instead. + ## PARAMETERS ### -Actual @@ -89,9 +101,10 @@ HelpMessage: '' ### -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: System.Type +Type: System.Object DefaultValue: '' SupportsWildcards: false Aliases: [] @@ -135,4 +148,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](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-Invoke.mdx b/docs/commands/Should-Invoke.mdx index c2a7a15b..532e14be 100644 --- a/docs/commands/Should-Invoke.mdx +++ b/docs/commands/Should-Invoke.mdx @@ -414,4 +414,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](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-MatchString.mdx b/docs/commands/Should-MatchString.mdx index f9f7117b..9e37abd9 100644 --- a/docs/commands/Should-MatchString.mdx +++ b/docs/commands/Should-MatchString.mdx @@ -172,4 +172,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](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-NotBe.mdx b/docs/commands/Should-NotBe.mdx index 09b44956..a9a344f1 100644 --- a/docs/commands/Should-NotBe.mdx +++ b/docs/commands/Should-NotBe.mdx @@ -135,4 +135,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](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-NotBeEmptyString.mdx b/docs/commands/Should-NotBeEmptyString.mdx index 4460c305..ea594675 100644 --- a/docs/commands/Should-NotBeEmptyString.mdx +++ b/docs/commands/Should-NotBeEmptyString.mdx @@ -134,4 +134,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](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-NotBeLikeString.mdx b/docs/commands/Should-NotBeLikeString.mdx index baf2c1fb..a0514ea8 100644 --- a/docs/commands/Should-NotBeLikeString.mdx +++ b/docs/commands/Should-NotBeLikeString.mdx @@ -166,4 +166,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](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-NotBeNull.mdx b/docs/commands/Should-NotBeNull.mdx index cb4c7af1..3fe1419a 100644 --- a/docs/commands/Should-NotBeNull.mdx +++ b/docs/commands/Should-NotBeNull.mdx @@ -55,7 +55,7 @@ SupportsWildcards: false Aliases: [] ParameterSets: - Name: (All) - Position: 1 + Position: 0 IsRequired: false ValueFromPipeline: true ValueFromPipelineByPropertyName: false @@ -114,4 +114,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](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-NotBeSame.mdx b/docs/commands/Should-NotBeSame.mdx index 466dda13..6ef79a4a 100644 --- a/docs/commands/Should-NotBeSame.mdx +++ b/docs/commands/Should-NotBeSame.mdx @@ -146,4 +146,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](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-NotBeString.mdx b/docs/commands/Should-NotBeString.mdx index bd1259f5..548b1577 100644 --- a/docs/commands/Should-NotBeString.mdx +++ b/docs/commands/Should-NotBeString.mdx @@ -23,8 +23,8 @@ Asserts that the actual value is not equal to the expected value. ## SYNTAX ```powershell -Should-NotBeString [[-Expected] ] [[-Actual] ] [-Because ] [-CaseSensitive] - [-IgnoreWhitespace] +Should-NotBeString [-Expected] [[-Actual] ] [-Because ] [-CaseSensitive] + [-IgnoreWhitespace] [-TrimWhitespace] [-NormalizeLineEnding] ``` ## DESCRIPTION @@ -127,7 +127,7 @@ Aliases: [] ParameterSets: - Name: (All) Position: 0 - IsRequired: false + IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: false @@ -157,6 +157,50 @@ AcceptedValues: [] HelpMessage: '' ``` +### -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: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -TrimWhitespace + +Trims whitespace at the start and end of the string. + +```yaml +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, @@ -187,4 +231,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](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 14790aeb..ffbc7a8b 100644 --- a/docs/commands/Should-NotBeWhiteSpaceString.mdx +++ b/docs/commands/Should-NotBeWhiteSpaceString.mdx @@ -135,4 +135,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](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 8784fde9..cacda164 100644 --- a/docs/commands/Should-NotContainCollection.mdx +++ b/docs/commands/Should-NotContainCollection.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](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 b0a118de..84bf0f5d 100644 --- a/docs/commands/Should-NotHaveParameter.mdx +++ b/docs/commands/Should-NotHaveParameter.mdx @@ -151,4 +151,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](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 6ae4e71c..96a84757 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 [-Expected] [[-Actual] ] [-Because ] +Should-NotHaveType [-Expected] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -31,6 +31,8 @@ Should-NotHaveType [-Expected] [[-Actual] ] [-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 @@ -89,9 +91,10 @@ HelpMessage: '' ### -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: System.Type +Type: System.Object DefaultValue: '' SupportsWildcards: false Aliases: [] @@ -137,4 +140,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](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 57713cef..d1a2cde1 100644 --- a/docs/commands/Should-NotInvoke.mdx +++ b/docs/commands/Should-NotInvoke.mdx @@ -367,4 +367,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](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 5550cb68..206326e2 100644 --- a/docs/commands/Should-NotMatchString.mdx +++ b/docs/commands/Should-NotMatchString.mdx @@ -173,4 +173,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](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 ca117e51..2077314c 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 [[-ExceptionMessage] ] [[-FullyQualifiedErrorId] ] - [[-ExceptionType] ] [[-Because] ] -ScriptBlock + [[-ExceptionType] ] -ScriptBlock [-Because ] [-AllowNonTerminatingError] ``` @@ -92,7 +92,7 @@ SupportsWildcards: false Aliases: [] ParameterSets: - Name: (All) - Position: 3 + Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false @@ -216,4 +216,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](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 57ae88aa..d28dab11 100644 --- a/docs/commands/Should.mdx +++ b/docs/commands/Should.mdx @@ -1833,4 +1833,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0](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 a8d1ee18..f64d3b63 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/versioned_docs/version-v5/commands/Add-ShouldOperator.mdx b/versioned_docs/version-v5/commands/Add-ShouldOperator.mdx index 3598db70..88080b88 100644 --- a/versioned_docs/version-v5/commands/Add-ShouldOperator.mdx +++ b/versioned_docs/version-v5/commands/Add-ShouldOperator.mdx @@ -194,4 +194,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/AfterAll.mdx b/versioned_docs/version-v5/commands/AfterAll.mdx index 45f471e7..5efec609 100644 --- a/versioned_docs/version-v5/commands/AfterAll.mdx +++ b/versioned_docs/version-v5/commands/AfterAll.mdx @@ -114,4 +114,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/AfterEach.mdx b/versioned_docs/version-v5/commands/AfterEach.mdx index 2a237c8d..fdb73c08 100644 --- a/versioned_docs/version-v5/commands/AfterEach.mdx +++ b/versioned_docs/version-v5/commands/AfterEach.mdx @@ -111,4 +111,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Assert-MockCalled.mdx b/versioned_docs/version-v5/commands/Assert-MockCalled.mdx index df680dfc..a675048b 100644 --- a/versioned_docs/version-v5/commands/Assert-MockCalled.mdx +++ b/versioned_docs/version-v5/commands/Assert-MockCalled.mdx @@ -222,4 +222,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Assert-VerifiableMock.mdx b/versioned_docs/version-v5/commands/Assert-VerifiableMock.mdx index 776fdf94..8151b9a7 100644 --- a/versioned_docs/version-v5/commands/Assert-VerifiableMock.mdx +++ b/versioned_docs/version-v5/commands/Assert-VerifiableMock.mdx @@ -64,4 +64,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/BeforeAll.mdx b/versioned_docs/version-v5/commands/BeforeAll.mdx index d3577124..3153583d 100644 --- a/versioned_docs/version-v5/commands/BeforeAll.mdx +++ b/versioned_docs/version-v5/commands/BeforeAll.mdx @@ -123,4 +123,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/BeforeDiscovery.mdx b/versioned_docs/version-v5/commands/BeforeDiscovery.mdx index 42db4814..219d4938 100644 --- a/versioned_docs/version-v5/commands/BeforeDiscovery.mdx +++ b/versioned_docs/version-v5/commands/BeforeDiscovery.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.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/BeforeEach.mdx b/versioned_docs/version-v5/commands/BeforeEach.mdx index 6d37f92e..ad70f172 100644 --- a/versioned_docs/version-v5/commands/BeforeEach.mdx +++ b/versioned_docs/version-v5/commands/BeforeEach.mdx @@ -108,4 +108,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Context.mdx b/versioned_docs/version-v5/commands/Context.mdx index 461dc243..85863165 100644 --- a/versioned_docs/version-v5/commands/Context.mdx +++ b/versioned_docs/version-v5/commands/Context.mdx @@ -208,4 +208,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/ConvertTo-JUnitReport.mdx b/versioned_docs/version-v5/commands/ConvertTo-JUnitReport.mdx index 49f64de9..dae69fe2 100644 --- a/versioned_docs/version-v5/commands/ConvertTo-JUnitReport.mdx +++ b/versioned_docs/version-v5/commands/ConvertTo-JUnitReport.mdx @@ -132,4 +132,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/ConvertTo-NUnitReport.mdx b/versioned_docs/version-v5/commands/ConvertTo-NUnitReport.mdx index a6c64ef4..e8ebd8f0 100644 --- a/versioned_docs/version-v5/commands/ConvertTo-NUnitReport.mdx +++ b/versioned_docs/version-v5/commands/ConvertTo-NUnitReport.mdx @@ -164,4 +164,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/ConvertTo-Pester4Result.mdx b/versioned_docs/version-v5/commands/ConvertTo-Pester4Result.mdx index aa5d83db..d35ebd34 100644 --- a/versioned_docs/version-v5/commands/ConvertTo-Pester4Result.mdx +++ b/versioned_docs/version-v5/commands/ConvertTo-Pester4Result.mdx @@ -95,4 +95,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Describe.mdx b/versioned_docs/version-v5/commands/Describe.mdx index ef9e43b4..f2f6617e 100644 --- a/versioned_docs/version-v5/commands/Describe.mdx +++ b/versioned_docs/version-v5/commands/Describe.mdx @@ -218,4 +218,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Export-JUnitReport.mdx b/versioned_docs/version-v5/commands/Export-JUnitReport.mdx index db0e5e2a..162a4108 100644 --- a/versioned_docs/version-v5/commands/Export-JUnitReport.mdx +++ b/versioned_docs/version-v5/commands/Export-JUnitReport.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.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Export-NUnitReport.mdx b/versioned_docs/version-v5/commands/Export-NUnitReport.mdx index 49398458..b7e049be 100644 --- a/versioned_docs/version-v5/commands/Export-NUnitReport.mdx +++ b/versioned_docs/version-v5/commands/Export-NUnitReport.mdx @@ -140,4 +140,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Get-ShouldOperator.mdx b/versioned_docs/version-v5/commands/Get-ShouldOperator.mdx index 34bb4a67..c9d35394 100644 --- a/versioned_docs/version-v5/commands/Get-ShouldOperator.mdx +++ b/versioned_docs/version-v5/commands/Get-ShouldOperator.mdx @@ -101,4 +101,4 @@ standard PowerShell discovery patterns (like `Get-Help Should -Parameter *`). ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/InModuleScope.mdx b/versioned_docs/version-v5/commands/InModuleScope.mdx index 8021c2b8..3a2f31cb 100644 --- a/versioned_docs/version-v5/commands/InModuleScope.mdx +++ b/versioned_docs/version-v5/commands/InModuleScope.mdx @@ -229,4 +229,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Invoke-Pester.mdx b/versioned_docs/version-v5/commands/Invoke-Pester.mdx index 7383648c..32316199 100644 --- a/versioned_docs/version-v5/commands/Invoke-Pester.mdx +++ b/versioned_docs/version-v5/commands/Invoke-Pester.mdx @@ -785,4 +785,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/It.mdx b/versioned_docs/version-v5/commands/It.mdx index 4ec745d9..88deb789 100644 --- a/versioned_docs/version-v5/commands/It.mdx +++ b/versioned_docs/version-v5/commands/It.mdx @@ -291,4 +291,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Mock.mdx b/versioned_docs/version-v5/commands/Mock.mdx index 64b3ee54..092d450e 100644 --- a/versioned_docs/version-v5/commands/Mock.mdx +++ b/versioned_docs/version-v5/commands/Mock.mdx @@ -376,4 +376,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/New-Fixture.mdx b/versioned_docs/version-v5/commands/New-Fixture.mdx index b3e30ad4..6b357706 100644 --- a/versioned_docs/version-v5/commands/New-Fixture.mdx +++ b/versioned_docs/version-v5/commands/New-Fixture.mdx @@ -151,4 +151,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/New-MockObject.mdx b/versioned_docs/version-v5/commands/New-MockObject.mdx index acdff9a4..738bf692 100644 --- a/versioned_docs/version-v5/commands/New-MockObject.mdx +++ b/versioned_docs/version-v5/commands/New-MockObject.mdx @@ -249,4 +249,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/New-PesterConfiguration.mdx b/versioned_docs/version-v5/commands/New-PesterConfiguration.mdx index 1408e3e1..dd54ec89 100644 --- a/versioned_docs/version-v5/commands/New-PesterConfiguration.mdx +++ b/versioned_docs/version-v5/commands/New-PesterConfiguration.mdx @@ -125,4 +125,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/New-PesterContainer.mdx b/versioned_docs/version-v5/commands/New-PesterContainer.mdx index eabe5228..0f409a1a 100644 --- a/versioned_docs/version-v5/commands/New-PesterContainer.mdx +++ b/versioned_docs/version-v5/commands/New-PesterContainer.mdx @@ -168,4 +168,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Set-ItResult.mdx b/versioned_docs/version-v5/commands/Set-ItResult.mdx index fdd77bb7..b304eeb3 100644 --- a/versioned_docs/version-v5/commands/Set-ItResult.mdx +++ b/versioned_docs/version-v5/commands/Set-ItResult.mdx @@ -186,4 +186,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Should.mdx b/versioned_docs/version-v5/commands/Should.mdx index 20a55999..2928103d 100644 --- a/versioned_docs/version-v5/commands/Should.mdx +++ b/versioned_docs/version-v5/commands/Should.mdx @@ -1791,4 +1791,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## VERSION -*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* +*This page was generated using comment-based help in [Pester 5.9.1](https://github.com/pester/Pester/tree/rel/5.x.x).* From e7037efc56c71f36dc8ccf3ad35e120561eb79cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Jare=C5=A1?= Date: Tue, 11 Aug 2026 22:30:51 +0200 Subject: [PATCH 15/17] Split multi-entry .LINK blocks into separate links MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Invoke-Gherkin in Pester 4.10.1 puts two entries in one .LINK block .LINK Invoke-Pester https://kevinmarquette.github.io/2017-03-17-... and PlatyPS v2 renders the whole block as one link with an empty url, so both entries end up dead. The old generator dropped the second line instead. Repair it in post-processing, one entry per line, and expand a bare command name to its pester.dev url so it matches the urls the other .LINK entries already use. Invoke-Gherkin is the only page affected today, the fix is generic so it also covers any help written the same way later. Verified: pnpm build passes and no longer warns about an empty link url. 🤖 --- generate-command-reference.ps1 | 37 +++++++++++++++++++ .../version-v4/commands/Invoke-Gherkin.mdx | 4 +- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/generate-command-reference.ps1 b/generate-command-reference.ps1 index 9d52116b..eed68b26 100644 --- a/generate-command-reference.ps1 +++ b/generate-command-reference.ps1 @@ -224,11 +224,46 @@ function Repair-ExampleFences { return ($result -join $eol) } +function Repair-RelatedLinks { + <# + A .LINK block that holds more than one entry is rendered as a single link + with an empty url, for example + + - [Invoke-Pester + https://kevinmarquette.github.io/2017-03-17-...]() + + Invoke-Gherkin in Pester 4.10.1 writes its help that way. Split such a link + into one entry per line, and expand a bare command name to its pester.dev url + so it matches the urls the other .LINK entries already use. + #> + param([string] $Content) + + $eol = if ($Content -match "`r`n") { "`r`n" } else { "`n" } + + [regex]::Replace( + $Content, + '(?m)^-[ ]\[([\s\S]*?)\]\(\)[ ]*$', + { + param($m) + $entries = $m.Groups[1].Value -split "`r?`n" | + ForEach-Object { $_.Trim() } | + Where-Object { $_ } + + ($entries | ForEach-Object { + $target = if ($_ -match '^https?://') { $_ } else { "https://pester.dev/docs/commands/$_" } + "- [$target]($target)" + }) -join $eol + } + ) +} + # ----------------------------------------------------------------------------- # Post-process the generated MDX: # * Repair the mismatched code fences PlatyPS emits for .EXAMPLE blocks that # contain their own Markdown fences (see Repair-ExampleFences) so the MDX # compiles. +# * Split multi-entry .LINK blocks that render as one link with an empty url +# (see Repair-RelatedLinks) so the links are not dead. # ----------------------------------------------------------------------------- Write-Host 'Post-processing generated MDX files' -ForegroundColor Magenta $commandsFolder = Join-Path -Path $docusaurusOptions.DocsFolder -ChildPath $docusaurusOptions.Sidebar @@ -237,6 +272,8 @@ Get-ChildItem -Path $commandsFolder -Filter '*.mdx' | ForEach-Object { # Fix mismatched code fences inside the EXAMPLES section # TODO: Remove? Not really needed. Only fixed two earlier typos in pester/pester repo. $updated = Repair-ExampleFences -Content $content + # Fix RELATED LINKS entries that lost their url + $updated = Repair-RelatedLinks -Content $updated if ($updated -ne $content) { Set-Content -LiteralPath $_.FullName -Value $updated -NoNewline -Encoding utf8 } diff --git a/versioned_docs/version-v4/commands/Invoke-Gherkin.mdx b/versioned_docs/version-v4/commands/Invoke-Gherkin.mdx index ee67ad8f..073fd3d9 100644 --- a/versioned_docs/version-v4/commands/Invoke-Gherkin.mdx +++ b/versioned_docs/version-v4/commands/Invoke-Gherkin.mdx @@ -468,8 +468,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -- [Invoke-Pester -https://kevinmarquette.github.io/2017-03-17-Powershell-Gherkin-specification-validation/]() +- [https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) +- [https://kevinmarquette.github.io/2017-03-17-Powershell-Gherkin-specification-validation/](https://kevinmarquette.github.io/2017-03-17-Powershell-Gherkin-specification-validation/) - [https://kevinmarquette.github.io/2017-04-30-Powershell-Gherkin-advanced-features/](https://kevinmarquette.github.io/2017-04-30-Powershell-Gherkin-advanced-features/) ## VERSION From 4a0cc3fcb8c7dcac365dde266606ea0202ca38c0 Mon Sep 17 00:00:00 2001 From: Frode Flaten <3436158+fflaten@users.noreply.github.com> Date: Thu, 13 Aug 2026 19:59:19 +0000 Subject: [PATCH 16/17] Note related version for excluded commands --- generate-command-reference.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/generate-command-reference.ps1 b/generate-command-reference.ps1 index eed68b26..376cd542 100644 --- a/generate-command-reference.ps1 +++ b/generate-command-reference.ps1 @@ -119,10 +119,10 @@ $docusaurusOptions = @{ SideBar = 'commands' EditUrl = 'null' # prevent the `Edit this Page` button from appearing Exclude = @( - 'Get-MockDynamicParameter' - 'Invoke-Mock' - 'SafeGetCommand' - 'Set-DynamicParameterVariable' + 'Get-MockDynamicParameter' # v4 only + 'Invoke-Mock' # v4 only + 'SafeGetCommand' # v4 only + 'Set-DynamicParameterVariable' # v4 only ) MetaKeywords = @( 'PowerShell' From 1bba849fccbfa572677ff7f113fa0a011239e88d Mon Sep 17 00:00:00 2001 From: Frode Flaten <3436158+fflaten@users.noreply.github.com> Date: Thu, 13 Aug 2026 20:18:38 +0000 Subject: [PATCH 17/17] Restrict link post processing to v4 --- generate-command-reference.ps1 | 14 ++++++++++---- .../version-v4/commands/Invoke-Gherkin.mdx | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/generate-command-reference.ps1 b/generate-command-reference.ps1 index 376cd542..01e0c20d 100644 --- a/generate-command-reference.ps1 +++ b/generate-command-reference.ps1 @@ -250,7 +250,7 @@ function Repair-RelatedLinks { Where-Object { $_ } ($entries | ForEach-Object { - $target = if ($_ -match '^https?://') { $_ } else { "https://pester.dev/docs/commands/$_" } + $target = if ($_ -match '^https?://') { $_ } else { "https://pester.dev/docs/$DocsVersion/commands/$_" } "- [$target]($target)" }) -join $eol } @@ -262,18 +262,24 @@ function Repair-RelatedLinks { # * Repair the mismatched code fences PlatyPS emits for .EXAMPLE blocks that # contain their own Markdown fences (see Repair-ExampleFences) so the MDX # compiles. -# * Split multi-entry .LINK blocks that render as one link with an empty url +# * Split multi-entry .LINK blocks in v4 that render as one link with an empty url # (see Repair-RelatedLinks) so the links are not dead. # ----------------------------------------------------------------------------- Write-Host 'Post-processing generated MDX files' -ForegroundColor Magenta $commandsFolder = Join-Path -Path $docusaurusOptions.DocsFolder -ChildPath $docusaurusOptions.Sidebar Get-ChildItem -Path $commandsFolder -Filter '*.mdx' | ForEach-Object { $content = Get-Content -LiteralPath $_.FullName -Raw + # Fix mismatched code fences inside the EXAMPLES section # TODO: Remove? Not really needed. Only fixed two earlier typos in pester/pester repo. $updated = Repair-ExampleFences -Content $content - # Fix RELATED LINKS entries that lost their url - $updated = Repair-RelatedLinks -Content $updated + + if ($DocsVersion -eq 'v4' -and $_.BaseName -eq 'Invoke-Gherkin') { + # Fix RELATED LINKS in Invoke-Gherkin. For every other version, fix source. + # Remove if 4.10.2 is ever released + $updated = Repair-RelatedLinks -Content $updated + } + if ($updated -ne $content) { Set-Content -LiteralPath $_.FullName -Value $updated -NoNewline -Encoding utf8 } diff --git a/versioned_docs/version-v4/commands/Invoke-Gherkin.mdx b/versioned_docs/version-v4/commands/Invoke-Gherkin.mdx index 073fd3d9..ad203fa1 100644 --- a/versioned_docs/version-v4/commands/Invoke-Gherkin.mdx +++ b/versioned_docs/version-v4/commands/Invoke-Gherkin.mdx @@ -468,7 +468,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -- [https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) +- [https://pester.dev/docs/v4/commands/Invoke-Pester](https://pester.dev/docs/v4/commands/Invoke-Pester) - [https://kevinmarquette.github.io/2017-03-17-Powershell-Gherkin-specification-validation/](https://kevinmarquette.github.io/2017-03-17-Powershell-Gherkin-specification-validation/) - [https://kevinmarquette.github.io/2017-04-30-Powershell-Gherkin-advanced-features/](https://kevinmarquette.github.io/2017-04-30-Powershell-Gherkin-advanced-features/)