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 1/2] 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 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 2/2] 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