From c79ef53d572e6675f8f09beca76c249e9608027b Mon Sep 17 00:00:00 2001 From: fflaten <3436158+fflaten@users.noreply.github.com> Date: Sun, 26 Jul 2026 23:11:44 +0000 Subject: [PATCH 1/3] Update generated docs to 4.10.1 --- .../commands/Add-AssertionOperator.mdx | 168 +- .../version-v4/commands/AfterAll.mdx | 44 +- .../version-v4/commands/AfterEach.mdx | 46 +- .../version-v4/commands/AfterEachFeature.mdx | 91 +- .../version-v4/commands/AfterEachScenario.mdx | 91 +- .../version-v4/commands/Assert-MockCalled.mdx | 240 +-- .../commands/Assert-VerifiableMock.mdx | 22 +- .../commands/Assert-VerifiableMocks.mdx | 27 +- .../version-v4/commands/BeforeAll.mdx | 44 +- .../version-v4/commands/BeforeEach.mdx | 46 +- .../version-v4/commands/BeforeEachFeature.mdx | 91 +- .../commands/BeforeEachScenario.mdx | 91 +- .../version-v4/commands/Context.mdx | 129 +- .../version-v4/commands/Describe.mdx | 135 +- .../version-v4/commands/Find-GherkinStep.mdx | 73 +- .../commands/Get-ShouldOperator.mdx | 50 +- .../version-v4/commands/Get-TestDriveItem.mdx | 39 +- .../version-v4/commands/GherkinStep.mdx | 78 +- versioned_docs/version-v4/commands/In.mdx | 73 +- .../version-v4/commands/InModuleScope.mdx | 69 +- .../version-v4/commands/Invoke-Gherkin.mdx | 461 +++--- .../version-v4/commands/Invoke-Pester.mdx | 665 ++++---- versioned_docs/version-v4/commands/It.mdx | 202 ++- versioned_docs/version-v4/commands/Mock.mdx | 235 +-- .../version-v4/commands/New-Fixture.mdx | 88 +- .../version-v4/commands/New-MockObject.mdx | 42 +- .../version-v4/commands/New-PesterOption.mdx | 163 +- .../version-v4/commands/Set-ItResult.mdx | 137 +- .../commands/Set-TestInconclusive.mdx | 49 +- versioned_docs/version-v4/commands/Setup.mdx | 152 +- versioned_docs/version-v4/commands/Should.mdx | 1413 ++++++++++++----- .../version-v4/commands/docusaurus.sidebar.js | 2 +- 32 files changed, 3250 insertions(+), 2006 deletions(-) diff --git a/versioned_docs/version-v4/commands/Add-AssertionOperator.mdx b/versioned_docs/version-v4/commands/Add-AssertionOperator.mdx index 5462690e..d51df92f 100644 --- a/versioned_docs/version-v4/commands/Add-AssertionOperator.mdx +++ b/versioned_docs/version-v4/commands/Add-AssertionOperator.mdx @@ -1,12 +1,9 @@ --- -# Override id to have common docId for Commands navbar-link for all versions -id: Add-ShouldOperator -# Override slug so url matches v4 name -slug: Add-AssertionOperator +id: Add-AssertionOperator title: Add-AssertionOperator -description: Help page for the Powershell Pester "Add-AssertionOperator" command +description: Help for Pester command 'Add-AssertionOperator'. Register an Assertion Operator with Pester keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -15,6 +12,10 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + ## SYNOPSIS Register an Assertion Operator with Pester @@ -22,8 +23,8 @@ Register an Assertion Operator with Pester ## SYNTAX ```powershell -Add-AssertionOperator [-Name] [-Test] [[-Alias] ] [[-InternalName] ] - [-SupportsArrayInput] [] +Add-AssertionOperator [-Name] [-Test] [[-Alias] ] + [[-InternalName] ] [-SupportsArrayInput] ``` ## DESCRIPTION @@ -37,7 +38,6 @@ This function allows you to create custom Should assertions. ```powershell function BeAwesome($ActualValue, [switch] $Negate) { - [bool] $succeeded = $ActualValue -eq 'Awesome' if ($Negate) { $succeeded = -not $succeeded } @@ -69,92 +69,120 @@ PS C:\> "bad" | should -BeAwesome ## PARAMETERS -### -Name +### -Alias -The name of the assertion. -This will become a Named Parameter of Should. +A list of aliases for the Named Parameter. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Test +### -InternalName -The test function. -The function must return a PSObject with a [Bool]succeeded and a [string]failureMessage property. +If -Name is different from the actual function name, record the actual function name here. +Used by Get-ShouldOperator to pull function help. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Alias +### -Name -A list of aliases for the Named Parameter. +The name of the assertion. +This will become a Named Parameter of Should. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -InternalName +### -SupportsArrayInput -If -Name is different from the actual function name, record the actual function name here. -Used by Get-ShouldOperator to pull function help. +Does the test function support the passing an array of values to test. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -SupportsArrayInput +### -Test -Does the test function support the passing an array of values to test. +The test function. +The function must return a PSObject with a [Bool]succeeded and a [string]failureMessage property. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -164,6 +192,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/AfterAll.mdx b/versioned_docs/version-v4/commands/AfterAll.mdx index 8beb035e..c075145b 100644 --- a/versioned_docs/version-v4/commands/AfterAll.mdx +++ b/versioned_docs/version-v4/commands/AfterAll.mdx @@ -1,9 +1,9 @@ --- id: AfterAll title: AfterAll -description: Help page for the Powershell Pester "AfterAll" command +description: Help for Pester command 'AfterAll'. Defines a series of steps to perform at the end of the current Context or Describe block. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + ## SYNOPSIS Defines a series of steps to perform at the end of the current Context @@ -20,7 +24,7 @@ or Describe block. ## SYNTAX ```powershell -AfterAll [-Scriptblock] [] +AfterAll [-Scriptblock] ``` ## DESCRIPTION @@ -46,20 +50,28 @@ PS C:\> {{ Add example code here }} the scriptblock to execute ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -69,8 +81,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/BeforeAll](https://pester.dev/docs/v4/commands/BeforeAll) +- [https://pester.dev/docs/commands/BeforeAll](https://pester.dev/docs/commands/BeforeAll) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/AfterEach.mdx b/versioned_docs/version-v4/commands/AfterEach.mdx index b9df474e..bb674291 100644 --- a/versioned_docs/version-v4/commands/AfterEach.mdx +++ b/versioned_docs/version-v4/commands/AfterEach.mdx @@ -1,9 +1,9 @@ --- id: AfterEach title: AfterEach -description: Help page for the Powershell Pester "AfterEach" command +description: Help for Pester command 'AfterEach'. Defines a series of steps to perform at the end of every It block within the current Context or Describe block. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + ## SYNOPSIS Defines a series of steps to perform at the end of every It block within @@ -20,7 +24,7 @@ the current Context or Describe block. ## SYNTAX ```powershell -AfterEach [-Scriptblock] [] +AfterEach [-Scriptblock] ``` ## DESCRIPTION @@ -28,7 +32,7 @@ AfterEach [-Scriptblock] [] BeforeEach, AfterEach, BeforeAll, and AfterAll are unique in that they apply to the entire Context or Describe block, regardless of the order of the statements in the Context or Describe. -For a full description of this + For a full description of this behavior, as well as how multiple BeforeEach or AfterEach blocks interact with each other, please refer to the about_BeforeEach_AfterEach help file. @@ -49,20 +53,28 @@ PS C:\> {{ Add example code here }} the scriptblock to execute ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -72,8 +84,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/BeforeEach](https://pester.dev/docs/v4/commands/BeforeEach) +- [https://pester.dev/docs/commands/BeforeEach](https://pester.dev/docs/commands/BeforeEach) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/AfterEachFeature.mdx b/versioned_docs/version-v4/commands/AfterEachFeature.mdx index 589732f7..b7555744 100644 --- a/versioned_docs/version-v4/commands/AfterEachFeature.mdx +++ b/versioned_docs/version-v4/commands/AfterEachFeature.mdx @@ -1,9 +1,9 @@ --- id: AfterEachFeature title: AfterEachFeature -description: Help page for the Powershell Pester "AfterEachFeature" command +description: Help for Pester command 'AfterEachFeature'. Defines a ScriptBlock hook to run at the very end of a test run keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + ## SYNOPSIS Defines a ScriptBlock hook to run at the very end of a test run @@ -21,13 +25,13 @@ Defines a ScriptBlock hook to run at the very end of a test run ### All (Default) ```powershell -AfterEachFeature [-Script] [] +AfterEachFeature [-Script] ``` ### Tags ```powershell -AfterEachFeature [-Tags] [-Script] [] +AfterEachFeature [-Tags] [-Script] ``` ## DESCRIPTION @@ -49,42 +53,61 @@ PS C:\> {{ Add example code here }} ## PARAMETERS -### -Tags +### -Script -Optional tags. -If set, this hook only runs for features with matching tags. +The ScriptBlock to run for the hook ```yaml -Type: String[] -Parameter Sets: Tags -Aliases: - -Required: True -Position: 1 -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: All + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Tags + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Script +### -Tags -The ScriptBlock to run for the hook +Optional tags. +If set, this hook only runs for features with matching tags. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Tags + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -94,12 +117,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/BeforeEachFeature](https://pester.dev/docs/v4/commands/BeforeEachFeature) - -[https://pester.dev/docs/v4/commands/BeforeEachScenario](https://pester.dev/docs/v4/commands/BeforeEachScenario) - -[https://pester.dev/docs/v4/commands/AfterEachScenario](https://pester.dev/docs/v4/commands/AfterEachScenario) +- [https://pester.dev/docs/commands/BeforeEachFeature](https://pester.dev/docs/commands/BeforeEachFeature) +- [https://pester.dev/docs/commands/BeforeEachScenario](https://pester.dev/docs/commands/BeforeEachScenario) +- [https://pester.dev/docs/commands/AfterEachScenario](https://pester.dev/docs/commands/AfterEachScenario) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/AfterEachScenario.mdx b/versioned_docs/version-v4/commands/AfterEachScenario.mdx index ef27578a..9d57f1c7 100644 --- a/versioned_docs/version-v4/commands/AfterEachScenario.mdx +++ b/versioned_docs/version-v4/commands/AfterEachScenario.mdx @@ -1,9 +1,9 @@ --- id: AfterEachScenario title: AfterEachScenario -description: Help page for the Powershell Pester "AfterEachScenario" command +description: Help for Pester command 'AfterEachScenario'. Defines a ScriptBlock hook to run after each scenario to set up the test environment keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + ## SYNOPSIS Defines a ScriptBlock hook to run after each scenario to set up the test environment @@ -21,13 +25,13 @@ Defines a ScriptBlock hook to run after each scenario to set up the test environ ### All (Default) ```powershell -AfterEachScenario [-Script] [] +AfterEachScenario [-Script] ``` ### Tags ```powershell -AfterEachScenario [-Tags] [-Script] [] +AfterEachScenario [-Tags] [-Script] ``` ## DESCRIPTION @@ -49,42 +53,61 @@ PS C:\> {{ Add example code here }} ## PARAMETERS -### -Tags +### -Script -Optional tags. -If set, this hook only runs for features with matching tags +The ScriptBlock to run for the hook ```yaml -Type: String[] -Parameter Sets: Tags -Aliases: - -Required: True -Position: 1 -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: All + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Tags + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Script +### -Tags -The ScriptBlock to run for the hook +Optional tags. +If set, this hook only runs for features with matching tags ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Tags + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -94,12 +117,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/BeforeEachScenario](https://pester.dev/docs/v4/commands/BeforeEachScenario) - -[https://pester.dev/docs/v4/commands/BeforeEachFeature](https://pester.dev/docs/v4/commands/BeforeEachFeature) - -[https://pester.dev/docs/v4/commands/AfterEachFeature](https://pester.dev/docs/v4/commands/AfterEachFeature) +- [https://pester.dev/docs/commands/BeforeEachScenario](https://pester.dev/docs/commands/BeforeEachScenario) +- [https://pester.dev/docs/commands/BeforeEachFeature](https://pester.dev/docs/commands/BeforeEachFeature) +- [https://pester.dev/docs/commands/AfterEachFeature](https://pester.dev/docs/commands/AfterEachFeature) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/Assert-MockCalled.mdx b/versioned_docs/version-v4/commands/Assert-MockCalled.mdx index 04062211..18596832 100644 --- a/versioned_docs/version-v4/commands/Assert-MockCalled.mdx +++ b/versioned_docs/version-v4/commands/Assert-MockCalled.mdx @@ -1,9 +1,9 @@ --- id: Assert-MockCalled title: Assert-MockCalled -description: Help page for the Powershell Pester "Assert-MockCalled" command +description: Help for Pester command 'Assert-MockCalled'. Checks if a Mocked command has been called a certain number of times and throws an exception if it has not. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + ## SYNOPSIS Checks if a Mocked command has been called a certain number of times @@ -22,22 +26,22 @@ and throws an exception if it has not. ### ParameterFilter (Default) ```powershell -Assert-MockCalled [-CommandName] [[-Times] ] [[-ParameterFilter] ] - [[-ModuleName] ] [[-Scope] ] [-Exactly] [] +Assert-MockCalled [-CommandName] [[-Times] ] [[-ParameterFilter] ] + [[-ModuleName] ] [[-Scope] ] [-Exactly] ``` ### ExclusiveFilter ```powershell -Assert-MockCalled [-CommandName] [[-Times] ] -ExclusiveFilter - [[-ModuleName] ] [[-Scope] ] [-Exactly] [] +Assert-MockCalled [-CommandName] [[-Times] ] [[-ModuleName] ] + [[-Scope] ] -ExclusiveFilter [-Exactly] ``` ## DESCRIPTION This command verifies that a mocked command has been called a certain number of times. -If the call history of the mocked command does not match the parameters + If the call history of the mocked command does not match the parameters passed to Assert-MockCalled, Assert-MockCalled will throw an exception. ## EXAMPLES @@ -117,7 +121,7 @@ Checks for calls only within the current It block. Describe 'Describe' { Mock -ModuleName SomeModule Set-Content { } - {... +{... Some Code ...} It 'Calls Set-Content at least once in the Describe block' { @@ -127,7 +131,7 @@ Some Code ...} ``` Checks for calls to the mock within the SomeModule module. -Note that both the Mock + Note that both the Mock and Assert-MockCalled commands use the same module name. ### EXAMPLE 7 @@ -147,51 +151,46 @@ the -Path parameter set to any other value. The mocked command whose call history should be checked. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Times - -The number of times that the mock must be called to avoid an exception -from throwing. - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: 1 -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ParameterFilter +### -Exactly -An optional filter to qualify which calls should be counted. -Only those -calls to the mock whose parameters cause this filter to return true -will be counted. +If this switch is present, the number specified in Times must match +exactly the number of times the mock has been called. +Otherwise it +must match "at least" the number of times specified. + If the value +passed to the Times parameter is zero, the Exactly switch is implied. ```yaml -Type: ScriptBlock -Parameter Sets: ParameterFilter -Aliases: - -Required: False -Position: 3 -Default value: { $True } -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExclusiveFilter @@ -199,40 +198,74 @@ Accept wildcard characters: False Like ParameterFilter, except when you use ExclusiveFilter, and there were any calls to the mocked command which do not match the filter, an exception will be thrown. -This is a convenient way to avoid needing + This is a convenient way to avoid needing to have two calls to Assert-MockCalled like this: Assert-MockCalled SomeCommand -Times 1 -ParameterFilter \{ $something -eq $true \} Assert-MockCalled SomeCommand -Times 0 -ParameterFilter \{ $something -ne $true \} ```yaml -Type: ScriptBlock -Parameter Sets: ExclusiveFilter -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: ExclusiveFilter + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ModuleName The module where the mock being checked was injected. -This is optional, + This is optional, and must match the ModuleName that was used when setting up the Mock. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -ParameterFilter + +An optional filter to qualify which calls should be counted. +Only those +calls to the mock whose parameters cause this filter to return true +will be counted. + +```yaml +Type: System.Management.Automation.ScriptBlock +DefaultValue: '{ $True }' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: ParameterFilter + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Scope @@ -258,41 +291,50 @@ all calls to the mocked command in the current Feature / Scenario block, as well as all child scopes of that block. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 5 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Exactly +### -Times -If this switch is present, the number specified in Times must match -exactly the number of times the mock has been called. -Otherwise it -must match "at least" the number of times specified. -If the value -passed to the Times parameter is zero, the Exactly switch is implied. +The number of times that the mock must be called to avoid an exception +from throwing. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Int32 +DefaultValue: 1 +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -302,9 +344,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable The parameter filter passed to Assert-MockCalled does not necessarily have to match the parameter filter (if any) which was used to create the Mock. -Assert-MockCalled will find any entry in the command history + Assert-MockCalled will find any entry in the command history which matches its parameter filter, regardless of how the Mock was created. -However, if any calls to the + However, if any calls to the mocked command are made which did not match any mock's parameter filter (resulting in the original command being executed instead of a mock), these calls to the original command are not tracked in the call history. In other words, Assert-MockCalled can only be used to check for calls to the mocked implementation, not @@ -312,6 +354,6 @@ to the original. ## RELATED LINKS -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/Assert-VerifiableMock.mdx b/versioned_docs/version-v4/commands/Assert-VerifiableMock.mdx index 7730d001..3728175d 100644 --- a/versioned_docs/version-v4/commands/Assert-VerifiableMock.mdx +++ b/versioned_docs/version-v4/commands/Assert-VerifiableMock.mdx @@ -1,9 +1,9 @@ --- id: Assert-VerifiableMock title: Assert-VerifiableMock -description: Help page for the Powershell Pester "Assert-VerifiableMock" command +description: Help for Pester command 'Assert-VerifiableMock'. Checks if any Verifiable Mock has not been invoked. If so, this will throw an exception. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,15 +12,18 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + ## SYNOPSIS -Checks if any Verifiable Mock has not been invoked. -If so, this will throw an exception. +Checks if any Verifiable Mock has not been invoked. If so, this will throw an exception. ## SYNTAX ```powershell -Assert-VerifiableMock [] +Assert-VerifiableMock ``` ## DESCRIPTION @@ -66,7 +69,10 @@ This will not throw an exception because the mock was invoked. ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -76,6 +82,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/Assert-VerifiableMocks.mdx b/versioned_docs/version-v4/commands/Assert-VerifiableMocks.mdx index 77388e7a..2149902a 100644 --- a/versioned_docs/version-v4/commands/Assert-VerifiableMocks.mdx +++ b/versioned_docs/version-v4/commands/Assert-VerifiableMocks.mdx @@ -1,9 +1,9 @@ --- id: Assert-VerifiableMocks title: Assert-VerifiableMocks -description: Help page for the Powershell Pester "Assert-VerifiableMocks" command +description: Help for Pester command 'Assert-VerifiableMocks'. The function is for backward compatibility only. Please update your code and use 'Assert-VerifiableMock' instead. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,15 +12,18 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + ## SYNOPSIS -The function is for backward compatibility only. -Please update your code and use 'Assert-VerifiableMock' instead. +The function is for backward compatibility only. Please update your code and use 'Assert-VerifiableMock' instead. ## SYNTAX ```powershell -Assert-VerifiableMocks [] +Assert-VerifiableMocks ``` ## DESCRIPTION @@ -43,7 +46,10 @@ PS C:\> {{ Add example code here }} ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -53,10 +59,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/migrations/v3-to-v4](https://pester.dev/docs/v4/migrations/v3-to-v4) - -[https://github.com/pester/Pester/issues/880](https://github.com/pester/Pester/issues/880) +- [https://pester.dev/docs/migrations/v3-to-v4](https://pester.dev/docs/migrations/v3-to-v4) +- [https://github.com/pester/Pester/issues/880](https://github.com/pester/Pester/issues/880) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/BeforeAll.mdx b/versioned_docs/version-v4/commands/BeforeAll.mdx index 217c02a7..b6d85e81 100644 --- a/versioned_docs/version-v4/commands/BeforeAll.mdx +++ b/versioned_docs/version-v4/commands/BeforeAll.mdx @@ -1,9 +1,9 @@ --- id: BeforeAll title: BeforeAll -description: Help page for the Powershell Pester "BeforeAll" command +description: Help for Pester command 'BeforeAll'. Defines a series of steps to perform at the beginning of the current Context or Describe block. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + ## SYNOPSIS Defines a series of steps to perform at the beginning of the current Context @@ -20,7 +24,7 @@ or Describe block. ## SYNTAX ```powershell -BeforeAll [-Scriptblock] [] +BeforeAll [-Scriptblock] ``` ## DESCRIPTION @@ -46,20 +50,28 @@ PS C:\> {{ Add example code here }} the scriptblock to execute ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -69,8 +81,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/AfterAll](https://pester.dev/docs/v4/commands/AfterAll) +- [https://pester.dev/docs/commands/AfterAll](https://pester.dev/docs/commands/AfterAll) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/BeforeEach.mdx b/versioned_docs/version-v4/commands/BeforeEach.mdx index a370a968..ce801fa8 100644 --- a/versioned_docs/version-v4/commands/BeforeEach.mdx +++ b/versioned_docs/version-v4/commands/BeforeEach.mdx @@ -1,9 +1,9 @@ --- id: BeforeEach title: BeforeEach -description: Help page for the Powershell Pester "BeforeEach" command +description: Help for Pester command 'BeforeEach'. Defines a series of steps to perform at the beginning of every It block within the current Context or Describe block. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + ## SYNOPSIS Defines a series of steps to perform at the beginning of every It block within @@ -20,7 +24,7 @@ the current Context or Describe block. ## SYNTAX ```powershell -BeforeEach [-Scriptblock] [] +BeforeEach [-Scriptblock] ``` ## DESCRIPTION @@ -28,7 +32,7 @@ BeforeEach [-Scriptblock] [] BeforeEach, AfterEach, BeforeAll, and AfterAll are unique in that they apply to the entire Context or Describe block, regardless of the order of the statements in the Context or Describe. -For a full description of this + For a full description of this behavior, as well as how multiple BeforeEach or AfterEach blocks interact with each other, please refer to the about_BeforeEach_AfterEach help file. @@ -49,20 +53,28 @@ PS C:\> {{ Add example code here }} the scriptblock to execute ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -72,8 +84,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/AfterEach](https://pester.dev/docs/v4/commands/AfterEach) +- [https://pester.dev/docs/commands/AfterEach](https://pester.dev/docs/commands/AfterEach) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/BeforeEachFeature.mdx b/versioned_docs/version-v4/commands/BeforeEachFeature.mdx index f32c7e97..cfc8b915 100644 --- a/versioned_docs/version-v4/commands/BeforeEachFeature.mdx +++ b/versioned_docs/version-v4/commands/BeforeEachFeature.mdx @@ -1,9 +1,9 @@ --- id: BeforeEachFeature title: BeforeEachFeature -description: Help page for the Powershell Pester "BeforeEachFeature" command +description: Help for Pester command 'BeforeEachFeature'. Defines a ScriptBlock hook to run before each feature to set up the test environment keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + ## SYNOPSIS Defines a ScriptBlock hook to run before each feature to set up the test environment @@ -21,13 +25,13 @@ Defines a ScriptBlock hook to run before each feature to set up the test environ ### All (Default) ```powershell -BeforeEachFeature [-Script] [] +BeforeEachFeature [-Script] ``` ### Tags ```powershell -BeforeEachFeature [-Tags] [-Script] [] +BeforeEachFeature [-Tags] [-Script] ``` ## DESCRIPTION @@ -49,42 +53,61 @@ PS C:\> {{ Add example code here }} ## PARAMETERS -### -Tags +### -Script -Optional tags. -If set, this hook only runs for features with matching tags +The ScriptBlock to run for the hook ```yaml -Type: String[] -Parameter Sets: Tags -Aliases: - -Required: True -Position: 1 -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: All + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Tags + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Script +### -Tags -The ScriptBlock to run for the hook +Optional tags. +If set, this hook only runs for features with matching tags ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Tags + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -94,12 +117,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/AfterEachFeature](https://pester.dev/docs/v4/commands/AfterEachFeature) - -[https://pester.dev/docs/v4/commands/BeforeEachScenario](https://pester.dev/docs/v4/commands/BeforeEachScenario) - -[https://pester.dev/docs/v4/commands/AfterEachScenario](https://pester.dev/docs/v4/commands/AfterEachScenario) +- [https://pester.dev/docs/commands/AfterEachFeature](https://pester.dev/docs/commands/AfterEachFeature) +- [https://pester.dev/docs/commands/BeforeEachScenario](https://pester.dev/docs/commands/BeforeEachScenario) +- [https://pester.dev/docs/commands/AfterEachScenario](https://pester.dev/docs/commands/AfterEachScenario) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/BeforeEachScenario.mdx b/versioned_docs/version-v4/commands/BeforeEachScenario.mdx index ac56b906..3fa14fab 100644 --- a/versioned_docs/version-v4/commands/BeforeEachScenario.mdx +++ b/versioned_docs/version-v4/commands/BeforeEachScenario.mdx @@ -1,9 +1,9 @@ --- id: BeforeEachScenario title: BeforeEachScenario -description: Help page for the Powershell Pester "BeforeEachScenario" command +description: Help for Pester command 'BeforeEachScenario'. Defines a ScriptBlock hook to run before each scenario to set up the test environment keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + ## SYNOPSIS Defines a ScriptBlock hook to run before each scenario to set up the test environment @@ -21,13 +25,13 @@ Defines a ScriptBlock hook to run before each scenario to set up the test enviro ### All (Default) ```powershell -BeforeEachScenario [-Script] [] +BeforeEachScenario [-Script] ``` ### Tags ```powershell -BeforeEachScenario [-Tags] [-Script] [] +BeforeEachScenario [-Tags] [-Script] ``` ## DESCRIPTION @@ -51,42 +55,61 @@ PS C:\> {{ Add example code here }} ## PARAMETERS -### -Tags +### -Script -Optional tags. -If set, this hook only runs for features with matching tags +The ScriptBlock to run for the hook ```yaml -Type: String[] -Parameter Sets: Tags -Aliases: - -Required: True -Position: 1 -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: All + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Tags + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Script +### -Tags -The ScriptBlock to run for the hook +Optional tags. +If set, this hook only runs for features with matching tags ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Tags + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -96,12 +119,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/AfterEachScenario](https://pester.dev/docs/v4/commands/AfterEachScenario) - -[https://pester.dev/docs/v4/commands/BeforeEachFeature](https://pester.dev/docs/v4/commands/BeforeEachFeature) - -[https://pester.dev/docs/v4/commands/AfterEachFeature](https://pester.dev/docs/v4/commands/AfterEachFeature) +- [https://pester.dev/docs/commands/AfterEachScenario](https://pester.dev/docs/commands/AfterEachScenario) +- [https://pester.dev/docs/commands/BeforeEachFeature](https://pester.dev/docs/commands/BeforeEachFeature) +- [https://pester.dev/docs/commands/AfterEachFeature](https://pester.dev/docs/commands/AfterEachFeature) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/Context.mdx b/versioned_docs/version-v4/commands/Context.mdx index 8fae6305..937176c0 100644 --- a/versioned_docs/version-v4/commands/Context.mdx +++ b/versioned_docs/version-v4/commands/Context.mdx @@ -1,9 +1,9 @@ --- id: Context title: Context -description: Help page for the Powershell Pester "Context" command +description: Help for Pester command 'Context'. Provides logical grouping of It blocks within a single Describe block. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + ## SYNOPSIS Provides logical grouping of It blocks within a single Describe block. @@ -19,7 +23,7 @@ Provides logical grouping of It blocks within a single Describe block. ## SYNTAX ```powershell -Context [-Name] [-Tag ] [[-Fixture] ] [] +Context [-Name] [[-Fixture] ] [-Tag ] ``` ## DESCRIPTION @@ -38,11 +42,9 @@ apply to tests within that Context . ```powershell function Add-Numbers($a, $b) { return $a + $b - } Describe "Add-Numbers" { - Context "when root does not exist" { It "..." { ... } @@ -61,63 +63,82 @@ Describe "Add-Numbers" { ## PARAMETERS +### -Fixture + +Script that is executed. +This may include setup specific to the context +and one or more It blocks that validate the expected outcomes. + +```yaml +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + ### -Name The name of the Context. This is a phrase describing a set of tests within a describe. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Tag Optional parameter containing an array of strings. -When calling Invoke-Pester, + When calling Invoke-Pester, it is possible to specify a -Tag parameter which will only execute Context blocks containing the same Tag. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: Tags - -Required: False -Position: Named -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Fixture - -Script that is executed. -This may include setup specific to the context -and one or more It blocks that validate the expected outcomes. - -```yaml -Type: ScriptBlock -Parameter Sets: (All) +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +- Tags +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -127,20 +148,14 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/Describe](https://pester.dev/docs/v4/commands/Describe) - -[https://pester.dev/docs/v4/commands/It](https://pester.dev/docs/v4/commands/It) - -[https://pester.dev/docs/v4/commands/BeforeEach](https://pester.dev/docs/v4/commands/BeforeEach) - -[https://pester.dev/docs/v4/commands/AfterEach](https://pester.dev/docs/v4/commands/AfterEach) - -[https://pester.dev/docs/v4/commands/Should](https://pester.dev/docs/v4/commands/Should) - -[https://pester.dev/docs/v4/usage/mocking](https://pester.dev/docs/v4/usage/mocking) - -[https://pester.dev/docs/v4/usage/testdrive](https://pester.dev/docs/v4/usage/testdrive) +- [https://pester.dev/docs/commands/Describe](https://pester.dev/docs/commands/Describe) +- [https://pester.dev/docs/commands/It](https://pester.dev/docs/commands/It) +- [https://pester.dev/docs/commands/BeforeEach](https://pester.dev/docs/commands/BeforeEach) +- [https://pester.dev/docs/commands/AfterEach](https://pester.dev/docs/commands/AfterEach) +- [https://pester.dev/docs/commands/Should](https://pester.dev/docs/commands/Should) +- [https://pester.dev/docs/usage/mocking](https://pester.dev/docs/usage/mocking) +- [https://pester.dev/docs/usage/testdrive](https://pester.dev/docs/usage/testdrive) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/Describe.mdx b/versioned_docs/version-v4/commands/Describe.mdx index af5e4564..494fba8f 100644 --- a/versioned_docs/version-v4/commands/Describe.mdx +++ b/versioned_docs/version-v4/commands/Describe.mdx @@ -1,9 +1,9 @@ --- id: Describe title: Describe -description: Help page for the Powershell Pester "Describe" command +description: Help for Pester command 'Describe'. Creates a logical group of tests. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + ## SYNOPSIS Creates a logical group of tests. @@ -19,7 +23,7 @@ Creates a logical group of tests. ## SYNTAX ```powershell -Describe [-Name] [-Tag ] [[-Fixture] ] [] +Describe [-Name] [[-Fixture] ] [-Tag ] ``` ## DESCRIPTION @@ -28,7 +32,7 @@ Creates a logical group of tests. All Mocks, TestDrive and TestRegistry contents defined within a Describe block are scoped to that Describe; they will no longer be present when the Describe block exits. -A Describe + A Describe block may contain any number of Context and It blocks. ## EXAMPLES @@ -38,7 +42,6 @@ block may contain any number of Context and It blocks. ```powershell function Add-Numbers($a, $b) { return $a + $b - } Describe "Add-Numbers" { @@ -66,6 +69,33 @@ Describe "Add-Numbers" { ## PARAMETERS +### -Fixture + +The actual test script. +If you are following the AAA pattern (Arrange-Act-Assert), +this typically holds the arrange and act sections. +The Asserts will also lie +in this block but are typically nested each in its own It block. +Assertions are +typically performed by the Should command within the It blocks. + +```yaml +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + ### -Name The name of the test group. @@ -73,61 +103,53 @@ This is often an expressive phrase describing the scenario being tested. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Tag Optional parameter containing an array of strings. -When calling Invoke-Pester, + When calling Invoke-Pester, it is possible to specify a -Tag parameter which will only execute Describe blocks containing the same Tag. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: Tags - -Required: False -Position: Named -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Fixture - -The actual test script. -If you are following the AAA pattern (Arrange-Act-Assert), -this typically holds the arrange and act sections. -The Asserts will also lie -in this block but are typically nested each in its own It block. -Assertions are -typically performed by the Should command within the It blocks. - -```yaml -Type: ScriptBlock -Parameter Sets: (All) +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +- Tags +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -137,18 +159,13 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/It](https://pester.dev/docs/v4/commands/It) - -[https://pester.dev/docs/v4/commands/Context](https://pester.dev/docs/v4/commands/Context) - -[https://pester.dev/docs/v4/commands/Invoke-Pester](https://pester.dev/docs/v4/commands/Invoke-Pester) - -[https://pester.dev/docs/v4/commands/Should](https://pester.dev/docs/v4/commands/Should) - -[https://pester.dev/docs/v4/usage/mocking](https://pester.dev/docs/v4/usage/mocking) - -[https://pester.dev/docs/v4/usage/testdrive](https://pester.dev/docs/v4/usage/testdrive) +- [https://pester.dev/docs/commands/It](https://pester.dev/docs/commands/It) +- [https://pester.dev/docs/commands/Context](https://pester.dev/docs/commands/Context) +- [https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) +- [https://pester.dev/docs/commands/Should](https://pester.dev/docs/commands/Should) +- [https://pester.dev/docs/usage/mocking](https://pester.dev/docs/usage/mocking) +- [https://pester.dev/docs/usage/testdrive](https://pester.dev/docs/usage/testdrive) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/Find-GherkinStep.mdx b/versioned_docs/version-v4/commands/Find-GherkinStep.mdx index 8928971d..c71afae0 100644 --- a/versioned_docs/version-v4/commands/Find-GherkinStep.mdx +++ b/versioned_docs/version-v4/commands/Find-GherkinStep.mdx @@ -1,9 +1,9 @@ --- id: Find-GherkinStep title: Find-GherkinStep -description: Help page for the Powershell Pester "Find-GherkinStep" command +description: Help for Pester command 'Find-GherkinStep'. Find a step implmentation that matches a given step keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + ## SYNOPSIS Find a step implmentation that matches a given step @@ -19,7 +23,7 @@ Find a step implmentation that matches a given step ## SYNTAX ```powershell -Find-GherkinStep [[-Step] ] [[-BasePath] ] [] +Find-GherkinStep [[-Step] ] [[-BasePath] ] ``` ## DESCRIPTION @@ -41,41 +45,54 @@ And the module is imported .\module.Steps.ps1: line 39 ... ## PARAMETERS -### -Step +### -BasePath -The text from feature file +The path to search for step implementations. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: $Pwd +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -BasePath +### -Step -The path to search for step implementations. +The text from feature file ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: $Pwd -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -85,6 +102,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/Get-ShouldOperator.mdx b/versioned_docs/version-v4/commands/Get-ShouldOperator.mdx index f65f77d5..282189aa 100644 --- a/versioned_docs/version-v4/commands/Get-ShouldOperator.mdx +++ b/versioned_docs/version-v4/commands/Get-ShouldOperator.mdx @@ -1,9 +1,9 @@ --- id: Get-ShouldOperator title: Get-ShouldOperator -description: Help page for the Powershell Pester "Get-ShouldOperator" command +description: Help for Pester command 'Get-ShouldOperator'. Display the assertion operators available for use with Should. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + ## SYNOPSIS Display the assertion operators available for use with Should. @@ -19,7 +23,7 @@ Display the assertion operators available for use with Should. ## SYNTAX ```powershell -Get-ShouldOperator [-Name ] [] +Get-ShouldOperator [-Name ] ``` ## DESCRIPTION @@ -36,18 +40,16 @@ including any registered by the user with Add-AssertionOperator. ```powershell Get-ShouldOperator -``` - Return all available Should assertion operators and their aliases. +``` ### EXAMPLE 2 ```powershell Get-ShouldOperator -Name Be -``` - Return help examples for the Be assertion operator. -Name is a dynamic parameter that tab completes all available options. +``` ## PARAMETERS @@ -56,20 +58,28 @@ Return help examples for the Be assertion operator. \{\{ Fill Name Description \}\} ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -84,8 +94,8 @@ standard PowerShell discovery patterns (like `Get-Help Should -Parameter *`). ## RELATED LINKS -[https://pester.dev/docs/v4/commands/Should](https://pester.dev/docs/v4/commands/Should) +- [https://pester.dev/docs/commands/Should](https://pester.dev/docs/commands/Should) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/Get-TestDriveItem.mdx b/versioned_docs/version-v4/commands/Get-TestDriveItem.mdx index 98f29c28..294e9f6c 100644 --- a/versioned_docs/version-v4/commands/Get-TestDriveItem.mdx +++ b/versioned_docs/version-v4/commands/Get-TestDriveItem.mdx @@ -1,9 +1,9 @@ --- id: Get-TestDriveItem title: Get-TestDriveItem -description: Help page for the Powershell Pester "Get-TestDriveItem" command +description: Help for Pester command 'Get-TestDriveItem'. The Get-TestDriveItem cmdlet gets the item in Pester test drive. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + ## SYNOPSIS The Get-TestDriveItem cmdlet gets the item in Pester test drive. @@ -19,7 +23,7 @@ The Get-TestDriveItem cmdlet gets the item in Pester test drive. ## SYNTAX ```powershell -Get-TestDriveItem [[-Path] ] +Get-TestDriveItem [[-Path] ] ``` ## DESCRIPTION @@ -55,15 +59,20 @@ Wildcards are permitted. This parameter is required, but the parameter name ("Path") is optional. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ## INPUTS @@ -74,8 +83,8 @@ Accept wildcard characters: False ## RELATED LINKS -[https://pester.dev/docs/v4/usage/testdrive](https://pester.dev/docs/v4/usage/testdrive) +- [https://pester.dev/docs/usage/testdrive](https://pester.dev/docs/usage/testdrive) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/GherkinStep.mdx b/versioned_docs/version-v4/commands/GherkinStep.mdx index 11090115..af11f6fc 100644 --- a/versioned_docs/version-v4/commands/GherkinStep.mdx +++ b/versioned_docs/version-v4/commands/GherkinStep.mdx @@ -1,9 +1,9 @@ --- id: GherkinStep title: GherkinStep -description: Help page for the Powershell Pester "GherkinStep" command +description: Help for Pester command 'GherkinStep'. A step in a test, also known as a Given, When, or Then keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + ## SYNOPSIS A step in a test, also known as a Given, When, or Then @@ -19,7 +23,7 @@ A step in a test, also known as a Given, When, or Then ## SYNTAX ```powershell -GherkinStep [-Name] [-Test] [] +GherkinStep [-Name] [-Test] ``` ## DESCRIPTION @@ -42,15 +46,15 @@ executed in a manner that is similar to unit tests. Given 'we have a destination folder' { mkdir testdrive:\target -ErrorAction SilentlyContinue - 'testdrive:\target' | Should -Exist + 'testdrive:\target' | Should Exist } When 'we call Copy-Item' { - { Copy-Item testdrive:\source\something.txt testdrive:\target } | Should -Not -Throw + { Copy-Item testdrive:\source\something.txt testdrive:\target } | Should Not Throw } Then 'we have a new file in the destination' { - 'testdrive:\target\something.txt' | Should -Exist + 'testdrive:\target\something.txt' | Should Exist } # Steps need to allign with feature specifications in a *.feature file @@ -70,14 +74,13 @@ Scenario: The file exists, and the target folder exists ```powershell # This example shows a complex regex match that can be used for multiple lines in the feature specification - # The named match is mapped to the script parameter # filename: namedregex.Step.ps1 -Given 'we have a (?\\S*) function' { +Given 'we have a (?\S*) function' { param($name) - "$psscriptroot\..\MyModule\*\$name.ps1" | Should -Exist + "$psscriptroot\..\MyModule\*\$name.ps1" | Should Exist } # filename: namedregex.feature @@ -98,15 +101,20 @@ The name of a gherkin step is actually a regular expression, from which capturin are cast and passed to the parameters in the ScriptBlock ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Test @@ -116,20 +124,28 @@ May accept parameters from regular expression capturing groups (named or not), or from tables or multiline strings. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -139,8 +155,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://sites.google.com/site/unclebobconsultingllc/the-truth-about-bdd](https://sites.google.com/site/unclebobconsultingllc/the-truth-about-bdd) +- [https://sites.google.com/site/unclebobconsultingllc/the-truth-about-bdd](https://sites.google.com/site/unclebobconsultingllc/the-truth-about-bdd) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/In.mdx b/versioned_docs/version-v4/commands/In.mdx index 5de4ee8a..f66978e2 100644 --- a/versioned_docs/version-v4/commands/In.mdx +++ b/versioned_docs/version-v4/commands/In.mdx @@ -1,9 +1,9 @@ --- id: In title: In -description: Help page for the Powershell Pester "In" command +description: Help for Pester command 'In'. A convenience function that executes a script from a specified path. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + ## SYNOPSIS A convenience function that executes a script from a specified path. @@ -19,7 +23,7 @@ A convenience function that executes a script from a specified path. ## SYNTAX ```powershell -In [[-path] ] [[-execute] ] [] +In [[-path] ] [[-execute] ] ``` ## DESCRIPTION @@ -42,41 +46,54 @@ PS C:\> {{ Add example code here }} ## PARAMETERS -### -path +### -execute -The path that the execute block will be executed in. +The script to be executed in the path provided. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -execute +### -path -The script to be executed in the path provided. +The path that the execute block will be executed in. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -86,6 +103,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/InModuleScope.mdx b/versioned_docs/version-v4/commands/InModuleScope.mdx index e9444552..b805538e 100644 --- a/versioned_docs/version-v4/commands/InModuleScope.mdx +++ b/versioned_docs/version-v4/commands/InModuleScope.mdx @@ -1,9 +1,9 @@ --- id: InModuleScope title: InModuleScope -description: Help page for the Powershell Pester "InModuleScope" command +description: Help for Pester command 'InModuleScope'. Allows you to execute parts of a test script within the scope of a PowerShell script module. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + ## SYNOPSIS Allows you to execute parts of a test script within the @@ -20,7 +24,7 @@ scope of a PowerShell script module. ## SYNTAX ```powershell -InModuleScope [-ModuleName] [-ScriptBlock] [] +InModuleScope [-ModuleName] [-ScriptBlock] ``` ## DESCRIPTION @@ -39,11 +43,9 @@ either inside or outside a Describe block. ```powershell # The script module: - function PublicFunction { # Does something - } function PrivateFunction @@ -69,7 +71,7 @@ InModuleScope MyModule { Normally you would not be able to access "PrivateFunction" from the PowerShell session, because the module only exported "PublicFunction". -Using InModuleScope allowed this call to + Using InModuleScope allowed this call to "PrivateFunction" to work successfully. ## PARAMETERS @@ -82,15 +84,20 @@ This module must already be loaded into the current PowerShell session. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ScriptBlock @@ -98,20 +105,28 @@ Accept wildcard characters: False The code to be executed within the script module. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -121,6 +136,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/Invoke-Gherkin.mdx b/versioned_docs/version-v4/commands/Invoke-Gherkin.mdx index 6d496492..02e58ad6 100644 --- a/versioned_docs/version-v4/commands/Invoke-Gherkin.mdx +++ b/versioned_docs/version-v4/commands/Invoke-Gherkin.mdx @@ -1,9 +1,9 @@ --- id: Invoke-Gherkin title: Invoke-Gherkin -description: Help page for the Powershell Pester "Invoke-Gherkin" command +description: Help for Pester command 'Invoke-Gherkin'. Invokes Pester to run all tests defined in .feature files keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + ## SYNOPSIS Invokes Pester to run all tests defined in .feature files @@ -21,17 +25,17 @@ Invokes Pester to run all tests defined in .feature files ### Default (Default) ```powershell -Invoke-Gherkin [[-Path] ] [[-ScenarioName] ] [-EnableExit] [[-Tag] ] - [-ExcludeTag ] [-CodeCoverage ] [-Strict] [-OutputFile ] [-OutputFormat ] - [-Quiet] [-PesterOption ] [-Show ] [-PassThru] [] +Invoke-Gherkin [[-Path] ] [[-ScenarioName] ] [-EnableExit] [[-Tag] ] + [-ExcludeTag ] [-CodeCoverage ] [-Strict] [-OutputFile ] + [-OutputFormat ] [-Quiet] [-PesterOption ] [-Show ] [-PassThru] ``` ### RetestFailed ```powershell -Invoke-Gherkin [-FailedLast] [[-Path] ] [[-ScenarioName] ] [-EnableExit] [[-Tag] ] - [-ExcludeTag ] [-CodeCoverage ] [-Strict] [-OutputFile ] [-OutputFormat ] - [-Quiet] [-PesterOption ] [-Show ] [-PassThru] [] +Invoke-Gherkin [[-Path] ] [[-ScenarioName] ] [-EnableExit] [[-Tag] ] + -FailedLast [-ExcludeTag ] [-CodeCoverage ] [-Strict] [-OutputFile ] + [-OutputFormat ] [-Quiet] [-PesterOption ] [-Show ] [-PassThru] ``` ## DESCRIPTION @@ -105,56 +109,38 @@ Runs all *.feature specifications in the current directory, and generates a cove ## PARAMETERS -### -FailedLast - -Rerun only the scenarios which failed last time - -```yaml -Type: SwitchParameter -Parameter Sets: RetestFailed -Aliases: - -Required: True -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Path - -This parameter indicates which feature files should be tested. +### -CodeCoverage -Aliased to 'Script' for compatibility with Pester, but does not support hashtables, since feature files don't take parameters. +Instructs Pester to generate a code coverage report in addition to running tests. + You may pass either hashtables or strings to this parameter. -```yaml -Type: String -Parameter Sets: (All) -Aliases: Script, relative_path - -Required: False -Position: 1 -Default value: $Pwd -Accept pipeline input: False -Accept wildcard characters: False -``` +If strings are used, they must be paths (wildcards allowed) to source files, and all commands in the files are analyzed for code coverage. -### -ScenarioName +By passing hashtables instead, you can limit the analysis to specific lines or functions within a file. +Hashtables must contain a Path key (which can be abbreviated to just "P"), and may contain Function (or "F"), StartLine (or "S"), +and EndLine ("E") keys to narrow down the commands to be analyzed. +If Function is specified, StartLine and EndLine are ignored. -When set, invokes testing of scenarios which match this name. +If only StartLine is defined, the entire script file starting with StartLine is analyzed. +If only EndLine is present, all lines in the script file up to and including EndLine are analyzed. -Aliased to 'Name' and 'TestName' for compatibility with Pester. +Both Function and Path (as well as simple strings passed instead of hashtables) may contain wildcards. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: Name, TestName - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object[] +DefaultValue: '@()' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -EnableExit @@ -163,127 +149,180 @@ Will cause Invoke-Gherkin to exit with a exit code equal to the number of failed Use this to "fail" a build when any tests fail. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Tag +### -ExcludeTag -Filters Scenarios and Features and runs only the ones tagged with the specified tags. +Informs Invoke-Gherkin to not run blocks tagged with the tags specified. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: Tags - -Required: False -Position: 5 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ExcludeTag +### -FailedLast -Informs Invoke-Gherkin to not run blocks tagged with the tags specified. +Rerun only the scenarios which failed last time ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: RetestFailed + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -CodeCoverage - -Instructs Pester to generate a code coverage report in addition to running tests. -You may pass either hashtables or strings to this parameter. +### -OutputFile -If strings are used, they must be paths (wildcards allowed) to source files, and all commands in the files are analyzed for code coverage. +The path to write a report file to. +If this path is not provided, no log will be generated. -By passing hashtables instead, you can limit the analysis to specific lines or functions within a file. -Hashtables must contain a Path key (which can be abbreviated to just "P"), and may contain Function (or "F"), StartLine (or "S"), -and EndLine ("E") keys to narrow down the commands to be analyzed. -If Function is specified, StartLine and EndLine are ignored. +```yaml +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` -If only StartLine is defined, the entire script file starting with StartLine is analyzed. -If only EndLine is present, all lines in the script file up to and including EndLine are analyzed. +### -OutputFormat -Both Function and Path (as well as simple strings passed instead of hashtables) may contain wildcards. +The format for output (LegacyNUnitXml or NUnitXml), defaults to NUnitXml ```yaml -Type: Object[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: NUnitXml +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Strict +### -PassThru -Makes Pending and Skipped tests to Failed tests. -Useful for continuous integration where you need -to make sure all tests passed. +Returns a custom object (PSCustomObject) that contains the test results. +By default, Invoke-Gherkin writes to the host program, not to the output stream (stdout). +If you try to save the result in a variable, the variable is empty unless you +use the PassThru parameter. +To suppress the host output, use the Quiet parameter. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -OutputFile +### -Path -The path to write a report file to. -If this path is not provided, no log will be generated. +This parameter indicates which feature files should be tested. + +Aliased to 'Script' for compatibility with Pester, but does not support hashtables, since feature files don't take parameters. ```yaml -Type: String -Parameter Sets: (All) +Type: System.String +DefaultValue: $Pwd +SupportsWildcards: false Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +- Script +- relative_path +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -OutputFormat +### -PesterOption -The format for output (LegacyNUnitXml or NUnitXml), defaults to NUnitXml +Sets advanced options for the test execution. +Enter a PesterOption object, +such as one that you create by using the New-PesterOption cmdlet, or a hash table +in which the keys are option names and the values are option values. +For more information on the options available, see the help for New-PesterOption. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: NUnitXml -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Quiet @@ -293,35 +332,45 @@ No other output is generated unless you specify PassThru, or one of the Output parameters. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -PesterOption +### -ScenarioName -Sets advanced options for the test execution. -Enter a PesterOption object, -such as one that you create by using the New-PesterOption cmdlet, or a hash table -in which the keys are option names and the values are option values. -For more information on the options available, see the help for New-PesterOption. +When set, invokes testing of scenarios which match this name. + +Aliased to 'Name' and 'TestName' for compatibility with Pester. ```yaml -Type: Object -Parameter Sets: (All) +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +- Name +- TestName +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Show @@ -343,41 +392,73 @@ This parameter does not affect the PassThru custom object or the XML output that is written when you use the Output parameters. ```yaml -Type: OutputTypes -Parameter Sets: (All) -Aliases: -Accepted values: None, Default, Passed, Failed, Pending, Skipped, Inconclusive, Describe, Context, Summary, Header, Fails, All +Type: Pester.OutputTypes +DefaultValue: All +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Strict -Required: False -Position: Named -Default value: All -Accept pipeline input: False -Accept wildcard characters: False +Makes Pending and Skipped tests to Failed tests. +Useful for continuous integration where you need +to make sure all tests passed. + +```yaml +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -PassThru +### -Tag -Returns a custom object (PSCustomObject) that contains the test results. -By default, Invoke-Gherkin writes to the host program, not to the output stream (stdout). -If you try to save the result in a variable, the variable is empty unless you -use the PassThru parameter. -To suppress the host output, use the Quiet parameter. +Filters Scenarios and Features and runs only the ones tagged with the specified tags. ```yaml -Type: SwitchParameter -Parameter Sets: (All) +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +- Tags +ParameterSets: +- Name: (All) + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -387,10 +468,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/Invoke-Pester](https://pester.dev/docs/v4/commands/Invoke-Pester) - -[https://kevinmarquette.github.io/2017-04-30-Powershell-Gherkin-advanced-features/](https://kevinmarquette.github.io/2017-04-30-Powershell-Gherkin-advanced-features/) +- [Invoke-Pester +https://kevinmarquette.github.io/2017-03-17-Powershell-Gherkin-specification-validation/]() +- [https://kevinmarquette.github.io/2017-04-30-Powershell-Gherkin-advanced-features/](https://kevinmarquette.github.io/2017-04-30-Powershell-Gherkin-advanced-features/) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/Invoke-Pester.mdx b/versioned_docs/version-v4/commands/Invoke-Pester.mdx index 41081c65..f033fb36 100644 --- a/versioned_docs/version-v4/commands/Invoke-Pester.mdx +++ b/versioned_docs/version-v4/commands/Invoke-Pester.mdx @@ -1,9 +1,9 @@ --- id: Invoke-Pester title: Invoke-Pester -description: Help page for the Powershell Pester "Invoke-Pester" command +description: Help for Pester command 'Invoke-Pester'. Runs Pester tests keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + ## SYNOPSIS Runs Pester tests @@ -21,20 +25,20 @@ Runs Pester tests ### Default (Default) ```powershell -Invoke-Pester [[-Script] ] [[-TestName] ] [-EnableExit] [[-Tag] ] - [-ExcludeTag ] [-PassThru] [-CodeCoverage ] [-CodeCoverageOutputFile ] - [-CodeCoverageOutputFileEncoding ] [-CodeCoverageOutputFileFormat ] [-Strict] [-Quiet] - [-PesterOption ] [-Show ] [] +Invoke-Pester [[-Script] ] [[-TestName] ] [-EnableExit] [[-Tag] ] + [-ExcludeTag ] [-PassThru] [-CodeCoverage ] [-CodeCoverageOutputFile ] + [-CodeCoverageOutputFileEncoding ] [-CodeCoverageOutputFileFormat ] [-Strict] + [-Quiet] [-PesterOption ] [-Show ] ``` ### NewOutputSet ```powershell -Invoke-Pester [[-Script] ] [[-TestName] ] [-EnableExit] [[-Tag] ] - [-ExcludeTag ] [-PassThru] [-CodeCoverage ] [-CodeCoverageOutputFile ] - [-CodeCoverageOutputFileEncoding ] [-CodeCoverageOutputFileFormat ] [-Strict] - -OutputFile [-OutputFormat ] [-Quiet] [-PesterOption ] [-Show ] - [] +Invoke-Pester [[-Script] ] [[-TestName] ] [-EnableExit] [[-Tag] ] + -OutputFile [-ExcludeTag ] [-PassThru] [-CodeCoverage ] + [-CodeCoverageOutputFile ] [-CodeCoverageOutputFileEncoding ] + [-CodeCoverageOutputFileFormat ] [-Strict] [-OutputFormat ] [-Quiet] + [-PesterOption ] [-Show ] ``` ## DESCRIPTION @@ -76,7 +80,7 @@ execution and returns the code that ran as a percentage of all tested code. Invoke-Pester, and the Pester module that exports it, are products of an open-source project hosted on GitHub. To view, comment, or contribute to the -repository, see [https://github.com/Pester](https://github.com/Pester). +repository, see https://github.com/Pester. ## EXAMPLES @@ -105,7 +109,7 @@ Invoke-Pester -Script D:\MyModule, @{ Path = '.\Tests\Utility\ModuleUnit.Tests.p This command runs all *.Tests.ps1 files in D:\MyModule and its subdirectories. It also runs the tests in the ModuleUnit.Tests.ps1 file using the following -parameters: `.\Tests\Utility\ModuleUnit.Tests.ps1 srvNano16 -Name User01` +parameters: .\Tests\Utility\ModuleUnit.Tests.ps1 srvNano16 -Name User01 ### EXAMPLE 4 @@ -115,7 +119,7 @@ Invoke-Pester -Script @{Script = $scriptText} This command runs all tests passed as string in $scriptText variable with no aditional parameters and arguments. This notation can be combined with -`Invoke-Pester -Script D:\MyModule, @{ Path = '.\Tests\Utility\ModuleUnit.Tests.ps1'; Parameters = @{ Name = 'User01' }; Arguments = srvNano16 }` +Invoke-Pester -Script D:\MyModule, @\{ Path = '.\Tests\Utility\ModuleUnit.Tests.ps1'; Parameters = @\{ Name = 'User01' \}; Arguments = srvNano16 \} if needed. This command can be used when tests and scripts are stored not on the FileSystem, but somewhere else, and it is impossible to provide a path to it. @@ -237,174 +241,6 @@ also has a Bug tag. ## PARAMETERS -### -Script - -Specifies the test files that Pester runs. -You can also use the Script parameter -to pass parameter names and values to a script that contains Pester tests. -The -value of the Script parameter can be a string, a hash table, or a collection -of hash tables and strings. -Wildcard characters are supported. - -The Script parameter is optional. -If you omit it, Invoke-Pester runs all -*.Tests.ps1 files in the local directory and its subdirectories recursively. - -To run tests in other files, such as .ps1 files, enter the path and file name of -the file. -(The file name is required. -Name patterns that end in "*.ps1" run only -*.Tests.ps1 files.) - -To run a Pester test with parameter names and/or values, use a hash table as the -value of the script parameter. -The keys in the hash table are: - --- Path [string] (required): Specifies a test to run. -The value is a path\file -name or name pattern. -Wildcards are permitted. -All hash tables in a Script -parameter value must have a Path key. - --- Parameters [hashtable]: Runs the script with the specified parameters. -The -value is a nested hash table with parameter name and value pairs, such as -`@{UserName = 'User01'; Id = '28'}`. - --- Arguments [array]: An array or comma-separated list of parameter values -without names, such as 'User01', 28. -Use this key to pass values to positional -parameters. - -```yaml -Type: Object[] -Parameter Sets: (All) -Aliases: Path, relative_path - -Required: False -Position: 1 -Default value: . -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -TestName - -Runs only tests in Describe blocks that have the specified name or name pattern. -Wildcard characters are supported. - -If you specify multiple TestName values, Invoke-Pester runs tests that have any -of the values in the Describe name (it ORs the TestName values). - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: Name - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EnableExit - -Will cause Invoke-Pester to exit with a exit code equal to the number of failed -tests once all tests have been run. -Use this to "fail" a build when any tests fail. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tag - -Runs only tests in Describe blocks with the specified Tag parameter values. -Wildcard characters are supported. -Tag values that include spaces or whitespace -will be split into multiple tags on the whitespace. - -When you specify multiple Tag values, Invoke-Pester runs tests that have any -of the listed tags (it ORs the tags). -However, when you specify TestName -and Tag values, Invoke-Pester runs only describe blocks that have one of the -specified TestName values and one of the specified Tag values. - -If you use both Tag and ExcludeTag, ExcludeTag takes precedence. - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: Tags - -Required: False -Position: 5 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ExcludeTag - -Omits tests in Describe blocks with the specified Tag parameter values. -Wildcard -characters are supported. -Tag values that include spaces or whitespace -will be split into multiple tags on the whitespace. - -When you specify multiple ExcludeTag values, Invoke-Pester omits tests that have -any of the listed tags (it ORs the tags). -However, when you specify TestName -and ExcludeTag values, Invoke-Pester omits only describe blocks that have one -of the specified TestName values and one of the specified Tag values. - -If you use both Tag and ExcludeTag, ExcludeTag takes precedence - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PassThru - -Returns a custom object (PSCustomObject) that contains the test results. - -By default, Invoke-Pester writes to the host program, not to the output stream (stdout). -If you try to save the result in a variable, the variable is empty unless you -use the PassThru parameter. - -To suppress the host output, use the Show parameter set to None. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -CodeCoverage Adds a code coverage report to the Pester tests. @@ -440,19 +276,19 @@ IncludeTests = $true option, as shown below. To run a code coverage test only on selected classes, functions or lines in a script, enter a hash table value with the following keys: --- Path (P)(mandatory) \: Enter one path to the files. +-- Path (P)(mandatory) <string>: Enter one path to the files. Wildcard characters are supported, but only one string is permitted. --- IncludeTests \: Includes code coverage for Pester test files (*.tests.ps1). +-- IncludeTests <bool>: Includes code coverage for Pester test files (*.tests.ps1). Default is false. One of the following: Class/Function or StartLine/EndLine --- Class (C) \: Enter the class name. +-- Class (C) <string>: Enter the class name. Wildcard characters are supported, but only one string is permitted. Default is *. --- Function (F) \: Enter the function name. +-- Function (F) <string>: Enter the function name. Wildcard characters are supported, but only one string is permitted. Default is *. @@ -466,15 +302,20 @@ Default is line 1. Default is the last line of the script. ```yaml -Type: Object[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object[] +DefaultValue: '@()' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CodeCoverageOutputFile @@ -487,15 +328,20 @@ a required extension (usually the xml). If this path is not provided, no file will be generated. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CodeCoverageOutputFileEncoding @@ -508,15 +354,20 @@ Supported encodings in the respective PowerShell version are the same as those supported by the cmdlet Out-File in that PowerShell version. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: Utf8 -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: utf8 +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CodeCoverageOutputFileFormat @@ -529,33 +380,76 @@ Currently supported formats are: - JaCoCo - this XML file format is compatible with the VSTS/TFS ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: JaCoCo -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: JaCoCo +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Strict +### -EnableExit -Makes Pending and Skipped tests to Failed tests. -Useful for continuous -integration where you need to make sure all tests passed. +Will cause Invoke-Pester to exit with a exit code equal to the number of failed +tests once all tests have been run. +Use this to "fail" a build when any tests fail. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -ExcludeTag + +Omits tests in Describe blocks with the specified Tag parameter values. +Wildcard +characters are supported. +Tag values that include spaces or whitespace +will be split into multiple tags on the whitespace. + +When you specify multiple ExcludeTag values, Invoke-Pester omits tests that have +any of the listed tags (it ORs the tags). +However, when you specify TestName +and ExcludeTag values, Invoke-Pester omits only describe blocks that have one +of the specified TestName values and one of the specified Tag values. + +If you use both Tag and ExcludeTag, ExcludeTag takes precedence -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +```yaml +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -OutputFile @@ -568,15 +462,20 @@ the xml extension. If this path is not provided, no log will be generated. ```yaml -Type: String -Parameter Sets: NewOutputSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: NewOutputSet + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -OutputFormat @@ -586,15 +485,72 @@ Two formats of output are supported: NUnitXml and JUnitXml. ```yaml -Type: String -Parameter Sets: NewOutputSet -Aliases: +Type: System.String +DefaultValue: NUnitXml +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: NewOutputSet + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` -Required: False -Position: Named -Default value: NUnitXml -Accept pipeline input: False -Accept wildcard characters: False +### -PassThru + +Returns a custom object (PSCustomObject) that contains the test results. + +By default, Invoke-Pester writes to the host program, not to the output stream (stdout). +If you try to save the result in a variable, the variable is empty unless you +use the PassThru parameter. + +To suppress the host output, use the Show parameter set to None. + +```yaml +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -PesterOption + +Sets advanced options for the test execution. +Enter a PesterOption object, +such as one that you create by using the New-PesterOption cmdlet, or a hash table +in which the keys are option names and the values are option values. +For more information on the options available, see the help for New-PesterOption. + +```yaml +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Quiet @@ -612,35 +568,80 @@ This parameter does not affect the PassThru custom object or the XML output that is written when you use the Output parameters. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -PesterOption +### -Script -Sets advanced options for the test execution. -Enter a PesterOption object, -such as one that you create by using the New-PesterOption cmdlet, or a hash table -in which the keys are option names and the values are option values. -For more information on the options available, see the help for New-PesterOption. +Specifies the test files that Pester runs. +You can also use the Script parameter +to pass parameter names and values to a script that contains Pester tests. +The +value of the Script parameter can be a string, a hash table, or a collection +of hash tables and strings. +Wildcard characters are supported. + +The Script parameter is optional. +If you omit it, Invoke-Pester runs all +*.Tests.ps1 files in the local directory and its subdirectories recursively. + +To run tests in other files, such as .ps1 files, enter the path and file name of +the file. +(The file name is required. +Name patterns that end in "*.ps1" run only +*.Tests.ps1 files.) + +To run a Pester test with parameter names and/or values, use a hash table as the +value of the script parameter. +The keys in the hash table are: + +-- Path [string] (required): Specifies a test to run. +The value is a path\file +name or name pattern. +Wildcards are permitted. +All hash tables in a Script +parameter value must have a Path key. + +-- Parameters [hashtable]: Runs the script with the specified parameters. +The +value is a nested hash table with parameter name and value pairs, such as +@\{UserName = 'User01'; Id = '28'\}. + +-- Arguments [array]: An array or comma-separated list of parameter values +without names, such as 'User01', 28. +Use this key to pass values to positional +parameters. ```yaml -Type: Object -Parameter Sets: (All) +Type: System.Object[] +DefaultValue: . +SupportsWildcards: false Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +- Path +- relative_path +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Show @@ -662,21 +663,110 @@ This parameter does not affect the PassThru custom object or the XML output that is written when you use the Output parameters. ```yaml -Type: OutputTypes -Parameter Sets: (All) +Type: Pester.OutputTypes +DefaultValue: All +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Strict + +Makes Pending and Skipped tests to Failed tests. +Useful for continuous +integration where you need to make sure all tests passed. + +```yaml +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Tag + +Runs only tests in Describe blocks with the specified Tag parameter values. +Wildcard characters are supported. +Tag values that include spaces or whitespace +will be split into multiple tags on the whitespace. + +When you specify multiple Tag values, Invoke-Pester runs tests that have any +of the listed tags (it ORs the tags). +However, when you specify TestName +and Tag values, Invoke-Pester runs only describe blocks that have one of the +specified TestName values and one of the specified Tag values. + +If you use both Tag and ExcludeTag, ExcludeTag takes precedence. + +```yaml +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false Aliases: -Accepted values: None, Default, Passed, Failed, Pending, Skipped, Inconclusive, Describe, Context, Summary, Header, Fails, All +- Tags +ParameterSets: +- Name: (All) + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -TestName + +Runs only tests in Describe blocks that have the specified name or name pattern. +Wildcard characters are supported. + +If you specify multiple TestName values, Invoke-Pester runs tests that have any +of the values in the Describe name (it ORs the TestName values). -Required: False -Position: Named -Default value: All -Accept pipeline input: False -Accept wildcard characters: False +```yaml +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: +- Name +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -686,10 +776,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/Describe](https://pester.dev/docs/v4/commands/Describe) - -[https://pester.dev/docs/v4/commands/New-PesterOption](https://pester.dev/docs/v4/commands/New-PesterOption) +- [https://pester.dev/docs/commands/Describe](https://pester.dev/docs/commands/Describe) +- [https://pester.dev/docs/commands/New-PesterOption](https://pester.dev/docs/commands/New-PesterOption) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/It.mdx b/versioned_docs/version-v4/commands/It.mdx index 37ab6039..ff4efa19 100644 --- a/versioned_docs/version-v4/commands/It.mdx +++ b/versioned_docs/version-v4/commands/It.mdx @@ -1,9 +1,9 @@ --- id: It title: It -description: Help page for the Powershell Pester "It" command +description: Help for Pester command 'It'. Validates the results of a test inside of a Describe block. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + ## SYNOPSIS Validates the results of a test inside of a Describe block. @@ -21,19 +25,19 @@ Validates the results of a test inside of a Describe block. ### Normal (Default) ```powershell -It [-Name] [[-Test] ] [-TestCases ] [] +It [-Name] [[-Test] ] [-TestCases ] ``` ### Pending ```powershell -It [-Name] [[-Test] ] [-TestCases ] [-Pending] [] +It [-Name] [[-Test] ] [-TestCases ] [-Pending] ``` ### Skip ```powershell -It [-Name] [[-Test] ] [-TestCases ] [-Skip] [] +It [-Name] [[-Test] ] [-TestCases ] [-Skip] ``` ## DESCRIPTION @@ -62,7 +66,6 @@ command as the first tested statement in the It block. ```powershell function Add-Numbers($a, $b) { return $a + $b - } Describe "Add-Numbers" { @@ -93,7 +96,6 @@ Describe "Add-Numbers" { ```powershell function Add-Numbers($a, $b) { return $a + $b - } Describe "Add-Numbers" { @@ -104,7 +106,7 @@ Describe "Add-Numbers" { @{ a = 'two'; b = 'three'; expectedResult = 'twothree' } ) - It 'Correctly adds \ and \ to get \' -TestCases $testCases { + It 'Correctly adds and to get ' -TestCases $testCases { param ($a, $b, $expectedResult) $sum = Add-Numbers $a $b @@ -120,57 +122,20 @@ Describe "Add-Numbers" { An expressive phrase describing the expected test outcome. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Test - -The script block that should throw an exception if the -expectation of the test is not met.If you are following the -AAA pattern (Arrange-Act-Assert), this typically holds the -Assert. - -```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: { } -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -TestCases - -Optional array of hashtable (or any IDictionary) objects. -If this parameter is used, -Pester will call the test script block once for each table in the TestCases array, -splatting the dictionary to the test script block as input. -If you want the name of -the test to appear differently for each test case, you can embed tokens into the Name -parameter with the syntax 'Adds numbers \ and \' (assuming you have keys named A and B -in your TestCases hashtables.) - -```yaml -Type: IDictionary[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Pending @@ -182,15 +147,20 @@ An empty test, that is a test that contains nothing except whitespace or comments is marked as Pending by default. ```yaml -Type: SwitchParameter -Parameter Sets: Pending -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Pending + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Skip @@ -202,20 +172,81 @@ Use the Strict parameter of Invoke-Pester to force all skipped tests to fail. ```yaml -Type: SwitchParameter -Parameter Sets: Skip -Aliases: Ignore - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: +- Ignore +ParameterSets: +- Name: Skip + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Test + +The script block that should throw an exception if the +expectation of the test is not met.If you are following the +AAA pattern (Arrange-Act-Assert), this typically holds the +Assert. + +```yaml +Type: System.Management.Automation.ScriptBlock +DefaultValue: '{ }' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -TestCases + +Optional array of hashtable (or any IDictionary) objects. + If this parameter is used, +Pester will call the test script block once for each table in the TestCases array, +splatting the dictionary to the test script block as input. + If you want the name of +the test to appear differently for each test case, you can embed tokens into the Name +parameter with the syntax 'Adds numbers <A> and <B>' (assuming you have keys named A and B +in your TestCases hashtables.) + +```yaml +Type: System.Collections.IDictionary[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -225,14 +256,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/Describe](https://pester.dev/docs/v4/commands/Describe) - -[https://pester.dev/docs/v4/commands/Context](https://pester.dev/docs/v4/commands/Context) - -[https://pester.dev/docs/v4/commands/Set-TestInconclusive](https://pester.dev/docs/v4/commands/Set-TestInconclusive) - -[https://pester.dev/docs/v4/commands/Should](https://pester.dev/docs/v4/commands/Should) +- [https://pester.dev/docs/commands/Describe](https://pester.dev/docs/commands/Describe) +- [https://pester.dev/docs/commands/Context](https://pester.dev/docs/commands/Context) +- [https://pester.dev/docs/commands/Set-TestInconclusive](https://pester.dev/docs/commands/Set-TestInconclusive) +- [https://pester.dev/docs/commands/Should](https://pester.dev/docs/commands/Should) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/Mock.mdx b/versioned_docs/version-v4/commands/Mock.mdx index 31f092b1..89fca279 100644 --- a/versioned_docs/version-v4/commands/Mock.mdx +++ b/versioned_docs/version-v4/commands/Mock.mdx @@ -1,9 +1,9 @@ --- id: Mock title: Mock -description: Help page for the Powershell Pester "Mock" command +description: Help for Pester command 'Mock'. Mocks the behavior of an existing command with an alternate implementation. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + ## SYNOPSIS Mocks the behavior of an existing command with an alternate @@ -20,9 +24,9 @@ implementation. ## SYNTAX ```powershell -Mock [[-CommandName] ] [[-MockWith] ] [-Verifiable] [[-ParameterFilter] ] - [[-ModuleName] ] [[-RemoveParameterType] ] [[-RemoveParameterValidation] ] - [] +Mock [[-CommandName] ] [[-MockWith] ] [[-ParameterFilter] ] + [[-ModuleName] ] [[-RemoveParameterType] ] + [[-RemoveParameterValidation] ] [-Verifiable] ``` ## DESCRIPTION @@ -160,11 +164,10 @@ New-Module -Name ModuleMockExample -ScriptBlock { function Hidden { "Internal Module Function" } function Exported { Hidden } - Export-ModuleMember -Function Exported +Export-ModuleMember -Function Exported } | Import-Module -Force Describe "ModuleMockExample" { - It "Hidden function is not directly accessible outside the module" { { Hidden } | Should -Throw } @@ -190,15 +193,20 @@ mocked by using the -ModuleName parameter. The name of the command to be mocked. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -MockWith @@ -211,32 +219,45 @@ being mocked, and the MockWith script block can contain references to the mocked commands parameter variables. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: { } -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '{ }' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Verifiable +### -ModuleName -When this is set, the mock will be checked when Assert-VerifiableMock is -called. +Optional string specifying the name of the module where this command +is to be mocked. + This should be a module that _calls_ the mocked +command; it doesn't necessarily have to be the same module which +originally implemented the command. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ParameterFilter @@ -249,35 +270,20 @@ This ScriptBlock must return a boolean value. See examples for usage. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: { $True } -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ModuleName - -Optional string specifying the name of the module where this command -is to be mocked. -This should be a module that _calls_ the mocked -command; it doesn't necessarily have to be the same module which -originally implemented the command. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '{ $True }' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -RemoveParameterType @@ -295,15 +301,20 @@ configuration of parameters will be ingored, including parameter validation described below. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 5 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -RemoveParameterValidation @@ -320,20 +331,50 @@ configuration of parameters will be ingored, including parameter types described above. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 6 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 5 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Verifiable + +When this is set, the mock will be checked when Assert-VerifiableMock is +called. + +```yaml +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -343,20 +384,14 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/Assert-MockCalled](https://pester.dev/docs/v4/commands/Assert-MockCalled) - -[https://pester.dev/docs/v4/commands/Assert-VerifiableMock](https://pester.dev/docs/v4/commands/Assert-VerifiableMock) - -[https://pester.dev/docs/v4/commands/Describe](https://pester.dev/docs/v4/commands/Describe) - -[https://pester.dev/docs/v4/commands/Context](https://pester.dev/docs/v4/commands/Context) - -[https://pester.dev/docs/v4/commands/It](https://pester.dev/docs/v4/commands/It) - -[https://pester.dev/docs/v4/commands/Should](https://pester.dev/docs/v4/commands/Should) - -[https://pester.dev/docs/v4/usage/mocking](https://pester.dev/docs/v4/usage/mocking) +- [https://pester.dev/docs/commands/Assert-MockCalled](https://pester.dev/docs/commands/Assert-MockCalled) +- [https://pester.dev/docs/commands/Assert-VerifiableMock](https://pester.dev/docs/commands/Assert-VerifiableMock) +- [https://pester.dev/docs/commands/Describe](https://pester.dev/docs/commands/Describe) +- [https://pester.dev/docs/commands/Context](https://pester.dev/docs/commands/Context) +- [https://pester.dev/docs/commands/It](https://pester.dev/docs/commands/It) +- [https://pester.dev/docs/commands/Should](https://pester.dev/docs/commands/Should) +- [https://pester.dev/docs/usage/mocking](https://pester.dev/docs/usage/mocking) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/New-Fixture.mdx b/versioned_docs/version-v4/commands/New-Fixture.mdx index 961d4a9c..63744540 100644 --- a/versioned_docs/version-v4/commands/New-Fixture.mdx +++ b/versioned_docs/version-v4/commands/New-Fixture.mdx @@ -1,9 +1,9 @@ --- id: New-Fixture title: New-Fixture -description: Help page for the Powershell Pester "New-Fixture" command +description: Help for Pester command 'New-Fixture'. This function generates two scripts, one that defines a function and another one that contains its tests. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + ## SYNOPSIS This function generates two scripts, one that defines a function @@ -20,7 +24,7 @@ and another one that contains its tests. ## SYNTAX ```powershell -New-Fixture [[-Path] ] [-Name] [] +New-Fixture [[-Path] ] [-Name] ``` ## DESCRIPTION @@ -34,7 +38,6 @@ The script defining the function: .\Clean.ps1: ``` function Clean { - } The script containing the example test .\Clean.Tests.ps1: @@ -45,7 +48,6 @@ $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.Tests\.', '.' "$here\$sut" Describe "Clean" { - It "does something useful" { $true | Should -Be $false } @@ -80,42 +82,55 @@ Creates a new folder named Cleaner in the current directory and creates the scri ## PARAMETERS -### -Path +### -Name -Defines path where the test and the function should be created, you can use full or relative path. -If the parameter is not specified the scripts are created in the current directory. +Defines the name of the function and the name of the test to be created. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: $PWD -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Name +### -Path -Defines the name of the function and the name of the test to be created. +Defines path where the test and the function should be created, you can use full or relative path. +If the parameter is not specified the scripts are created in the current directory. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: $PWD +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -125,14 +140,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/Describe](https://pester.dev/docs/v4/commands/Describe) - -[https://pester.dev/docs/v4/commands/Context](https://pester.dev/docs/v4/commands/Context) - -[https://pester.dev/docs/v4/commands/It](https://pester.dev/docs/v4/commands/It) - -[https://pester.dev/docs/v4/commands/Should](https://pester.dev/docs/v4/commands/Should) +- [https://pester.dev/docs/commands/Describe](https://pester.dev/docs/commands/Describe) +- [https://pester.dev/docs/commands/Context](https://pester.dev/docs/commands/Context) +- [https://pester.dev/docs/commands/It](https://pester.dev/docs/commands/It) +- [https://pester.dev/docs/commands/Should](https://pester.dev/docs/commands/Should) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/New-MockObject.mdx b/versioned_docs/version-v4/commands/New-MockObject.mdx index eaf121b2..d0ee9e1b 100644 --- a/versioned_docs/version-v4/commands/New-MockObject.mdx +++ b/versioned_docs/version-v4/commands/New-MockObject.mdx @@ -1,9 +1,9 @@ --- id: New-MockObject title: New-MockObject -description: Help page for the Powershell Pester "New-MockObject" command +description: Help for Pester command 'New-MockObject'. This function instantiates a .NET object from a type. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + ## SYNOPSIS This function instantiates a .NET object from a type. @@ -19,7 +23,7 @@ This function instantiates a .NET object from a type. ## SYNTAX ```powershell -New-MockObject [-Type] [] +New-MockObject [-Type] ``` ## DESCRIPTION @@ -45,20 +49,28 @@ $obj.GetType().FullName The .NET type to create an object based on. ```yaml -Type: Type -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Type +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -68,6 +80,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/New-PesterOption.mdx b/versioned_docs/version-v4/commands/New-PesterOption.mdx index 3019af87..af6e2a8c 100644 --- a/versioned_docs/version-v4/commands/New-PesterOption.mdx +++ b/versioned_docs/version-v4/commands/New-PesterOption.mdx @@ -1,9 +1,9 @@ --- id: New-PesterOption title: New-PesterOption -description: Help page for the Powershell Pester "New-PesterOption" command +description: Help for Pester command 'New-PesterOption'. Creates an object that contains advanced options for Invoke-Pester keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + ## SYNOPSIS Creates an object that contains advanced options for Invoke-Pester @@ -19,8 +23,8 @@ Creates an object that contains advanced options for Invoke-Pester ## SYNTAX ```powershell -New-PesterOption [-IncludeVSCodeMarker] [[-TestSuiteName] ] [-Experimental] [-ShowScopeHints] - [[-ScriptBlockFilter] ] [] +New-PesterOption [[-TestSuiteName] ] [[-ScriptBlockFilter] ] + [-IncludeVSCodeMarker] [-Experimental] [-ShowScopeHints] ``` ## DESCRIPTION @@ -44,54 +48,69 @@ will be named "Tests - Set A". ## PARAMETERS -### -IncludeVSCodeMarker +### -Experimental -When this switch is set, an extra line of output will be written to the console for test failures, making it easier -for VSCode's parser to provide highlighting / tooltips on the line where the error occurred. +Enables experimental features of Pester to be enabled. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -TestSuiteName +### -IncludeVSCodeMarker -When generating NUnit XML output, this controls the name assigned to the root "test-suite" element. -Defaults to "Pester". +When this switch is set, an extra line of output will be written to the console for test failures, making it easier +for VSCode's parser to provide highlighting / tooltips on the line where the error occurred. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: Pester -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Experimental +### -ScriptBlockFilter -Enables experimental features of Pester to be enabled. +Filters scriptblock based on the path and line number. +This is intended for integration with external tools so we don't rely on names (strings) that can have expandable variables in them. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Collections.Hashtable[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ShowScopeHints @@ -100,43 +119,57 @@ EXPERIMENTAL: Enables debugging output for debugging tranisition among scopes. (Experimental flag needs to be used to enable this.) ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ScriptBlockFilter +### -TestSuiteName -Filters scriptblock based on the path and line number. -This is intended for integration with external tools so we don't rely on names (strings) that can have expandable variables in them. +When generating NUnit XML output, this controls the name assigned to the root "test-suite" element. + Defaults to "Pester". ```yaml -Type: Hashtable[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: Pester +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS ### None -### You cannot pipe input to this command. +You cannot pipe input to this command. + ## OUTPUTS ### System.Management.Automation.PSObject @@ -145,8 +178,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v4/commands/Invoke-Pester](https://pester.dev/docs/v4/commands/Invoke-Pester) +- [https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/Set-ItResult.mdx b/versioned_docs/version-v4/commands/Set-ItResult.mdx index f5c429f3..f5fe7e40 100644 --- a/versioned_docs/version-v4/commands/Set-ItResult.mdx +++ b/versioned_docs/version-v4/commands/Set-ItResult.mdx @@ -1,9 +1,9 @@ --- id: Set-ItResult title: Set-ItResult -description: Help page for the Powershell Pester "Set-ItResult" command +description: Help for Pester command 'Set-ItResult'. Set-ItResult is used inside the It block to explicitly set the test result keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + ## SYNOPSIS Set-ItResult is used inside the It block to explicitly set the test result @@ -21,19 +25,19 @@ Set-ItResult is used inside the It block to explicitly set the test result ### Inconclusive ```powershell -Set-ItResult [-Inconclusive] [-Because ] [] +Set-ItResult [-Inconclusive] [-Because ] ``` ### Pending ```powershell -Set-ItResult [-Pending] [-Because ] [] +Set-ItResult [-Pending] [-Because ] ``` ### Skipped ```powershell -Set-ItResult [-Skipped] [-Because ] [] +Set-ItResult [-Skipped] [-Because ] ``` ## DESCRIPTION @@ -57,7 +61,7 @@ Describe "Example" { the output should be -``` +```powershell [?] Inconclusive result test, is inconclusive, because we want it to be inconclusive Tests completed in 0ms Tests Passed: 0, Failed: 0, Skipped: 0, Pending: 0, Inconclusive 1 @@ -75,7 +79,7 @@ Describe "Example" { the output should be -``` +```powershell [!] Skipped test, is skipped, because we want it to be skipped Tests completed in 0ms Tests Passed: 0, Failed: 0, Skipped: 0, Pending: 0, Inconclusive 1 @@ -83,21 +87,49 @@ Tests Passed: 0, Failed: 0, Skipped: 0, Pending: 0, Inconclusive 1 ## PARAMETERS +### -Because + +Similarily to failing tests, skipped and inconclusive tests should have reason. +It allows +to provide information to the user why the test is neither successful nor failed. + +```yaml +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + ### -Inconclusive Sets the test result to inconclusive. Cannot be used at the same time as -Pending or -Skipped ```yaml -Type: SwitchParameter -Parameter Sets: Inconclusive -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Inconclusive + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Pending @@ -106,15 +138,20 @@ Sets the test result to pending. Cannot be used at the same time as -Inconclusive or -Skipped ```yaml -Type: SwitchParameter -Parameter Sets: Pending -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Pending + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Skipped @@ -123,38 +160,28 @@ Sets the test result to skipped. Cannot be used at the same time as -Inconclusive or -Pending ```yaml -Type: SwitchParameter -Parameter Sets: Skipped -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Because - -Similarily to failing tests, skipped and inconclusive tests should have reason. -It allows -to provide information to the user why the test is neither successful nor failed. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Skipped + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -164,6 +191,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/Set-TestInconclusive.mdx b/versioned_docs/version-v4/commands/Set-TestInconclusive.mdx index bad67887..173c7986 100644 --- a/versioned_docs/version-v4/commands/Set-TestInconclusive.mdx +++ b/versioned_docs/version-v4/commands/Set-TestInconclusive.mdx @@ -1,9 +1,9 @@ --- id: Set-TestInconclusive title: Set-TestInconclusive -description: Help page for the Powershell Pester "Set-TestInconclusive" command +description: Help for Pester command 'Set-TestInconclusive'. Deprecated. Use `Set-ItResult -Inconclusive` instead keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,15 +12,18 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + ## SYNOPSIS -Deprecated. -Use `Set-ItResult -Inconclusive` instead +Deprecated. Use `Set-ItResult -Inconclusive` instead ## SYNTAX ```powershell -Set-TestInconclusive [[-Message] ] [] +Set-TestInconclusive [[-Message] ] ``` ## DESCRIPTION @@ -34,17 +37,15 @@ If you need this functionality please use the new Set-ItResult command. ```powershell Describe "Example" { - It "My test" { Set-TestInconclusive -Message "we forced it to be inconclusive" } - } ``` The test result. -``` +```powershell Describing Example [?] My test, is inconclusive because we forced it to be inconclusive 58ms ``` @@ -56,20 +57,28 @@ Describing Example Value assigned to the Message parameter will be displayed in the the test result. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -79,6 +88,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/Setup.mdx b/versioned_docs/version-v4/commands/Setup.mdx index 2ce61859..1069c55a 100644 --- a/versioned_docs/version-v4/commands/Setup.mdx +++ b/versioned_docs/version-v4/commands/Setup.mdx @@ -1,9 +1,9 @@ --- id: Setup title: Setup -description: Help page for the Powershell Pester "Setup" command +description: Help for Pester command 'Setup'. {{ Fill in the Synopsis }} keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,15 +12,18 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + ## SYNOPSIS -This command is included in the Pester Mocking framework for backwards compatibility. -You do not need to call it directly. +\{\{ Fill in the Synopsis \}\} ## SYNTAX ```powershell -Setup [-Dir] [-File] [[-Path] ] [[-Content] ] [-PassThru] +Setup [[-Path] ] [[-Content] ] [-Dir] [-File] [-PassThru] ``` ## DESCRIPTION @@ -39,84 +42,109 @@ PS C:\> {{ Add example code here }} ## PARAMETERS -### -Dir +### -Content -\{\{ Fill Dir Description \}\} +\{\{ Fill Content Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -File +### -Dir -\{\{ Fill File Description \}\} +\{\{ Fill Dir Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Path +### -File -\{\{ Fill Path Description \}\} +\{\{ Fill File Description \}\} ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Content +### -PassThru -\{\{ Fill Content Description \}\} +\{\{ Fill PassThru Description \}\} ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -PassThru +### -Path -\{\{ Fill PassThru Description \}\} +\{\{ Fill Path Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ## INPUTS @@ -127,6 +155,6 @@ Accept wildcard characters: False ## RELATED LINKS -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/Should.mdx b/versioned_docs/version-v4/commands/Should.mdx index f2df0b06..97f9f6fd 100644 --- a/versioned_docs/version-v4/commands/Should.mdx +++ b/versioned_docs/version-v4/commands/Should.mdx @@ -1,9 +1,9 @@ --- id: Should title: Should -description: Help page for the Powershell Pester "Should" command +description: Help for Pester command 'Should'. Should is a keyword what is used to define an assertion inside It block. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,6 +12,10 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +::: + ## SYNOPSIS Should is a keyword what is used to define an assertion inside It block. @@ -21,164 +25,156 @@ Should is a keyword what is used to define an assertion inside It block. ### Legacy (Default) ```powershell -Should [[-__LegacyArg1] ] [[-__LegacyArg2] ] [[-__LegacyArg3] ] [-ActualValue ] - [] +Should [[-__LegacyArg1] ] [[-__LegacyArg2] ] [[-__LegacyArg3] ] + [-ActualValue ] ``` ### Be ```powershell -Should [-ActualValue ] [-Be] [-Not] [-ExpectedValue ] [-Because ] [] +Should [[-ExpectedValue] ] [[-Because] ] -Be [-ActualValue ] [-Not] ``` ### BeExactly ```powershell -Should [-ActualValue ] [-Not] [-ExpectedValue ] [-Because ] [-BeExactly] - [] +Should [[-ExpectedValue] ] [[-Because] ] -BeExactly [-ActualValue ] [-Not] ``` ### BeGreaterThan ```powershell -Should [-ActualValue ] [-Not] [-ExpectedValue ] [-Because ] [-BeGreaterThan] - [] +Should [[-ExpectedValue] ] [[-Because] ] -BeGreaterThan [-ActualValue ] + [-Not] ``` ### BeLessOrEqual ```powershell -Should [-ActualValue ] [-Not] [-ExpectedValue ] [-Because ] [-BeLessOrEqual] - [] +Should [[-ExpectedValue] ] [[-Because] ] -BeLessOrEqual [-ActualValue ] + [-Not] ``` ### BeIn ```powershell -Should [-ActualValue ] [-Not] [-ExpectedValue ] [-Because ] [-BeIn] - [] +Should [[-ExpectedValue] ] [[-Because] ] -BeIn [-ActualValue ] [-Not] ``` ### BeLessThan ```powershell -Should [-ActualValue ] [-Not] [-ExpectedValue ] [-Because ] [-BeLessThan] - [] +Should [[-ExpectedValue] ] [[-Because] ] -BeLessThan [-ActualValue ] [-Not] ``` ### BeGreaterOrEqual ```powershell -Should [-ActualValue ] [-Not] [-ExpectedValue ] [-Because ] [-BeGreaterOrEqual] - [] +Should [[-ExpectedValue] ] [[-Because] ] -BeGreaterOrEqual [-ActualValue ] + [-Not] ``` ### BeLike ```powershell -Should [-ActualValue ] [-Not] [-ExpectedValue ] [-Because ] [-BeLike] - [] +Should [[-ExpectedValue] ] [[-Because] ] -BeLike [-ActualValue ] [-Not] ``` ### BeLikeExactly ```powershell -Should [-ActualValue ] [-Not] [-ExpectedValue ] [-Because ] [-BeLikeExactly] - [] +Should [[-ExpectedValue] ] [[-Because] ] -BeLikeExactly [-ActualValue ] + [-Not] ``` ### BeNullOrEmpty ```powershell -Should [-ActualValue ] [-Not] [-Because ] [-BeNullOrEmpty] [] +Should [[-Because] ] -BeNullOrEmpty [-ActualValue ] [-Not] ``` ### BeOfType ```powershell -Should [-ActualValue ] [-Not] [-Because ] [-BeOfType] [-ExpectedType ] - [] +Should [[-ExpectedType] ] [[-Because] ] -BeOfType [-ActualValue ] [-Not] ``` ### BeTrue ```powershell -Should [-ActualValue ] [-Not] [-Because ] [-BeTrue] [] +Should [[-Because] ] -BeTrue [-ActualValue ] [-Not] ``` ### BeFalse ```powershell -Should [-ActualValue ] [-Not] [-Because ] [-BeFalse] [] +Should [[-Because] ] -BeFalse [-ActualValue ] [-Not] ``` ### Contain ```powershell -Should [-ActualValue ] [-Not] [-ExpectedValue ] [-Because ] [-Contain] - [] +Should [[-ExpectedValue] ] [[-Because] ] -Contain [-ActualValue ] [-Not] ``` ### Exist ```powershell -Should [-ActualValue ] [-Not] [-Because ] [-Exist] [] +Should [[-Because] ] -Exist [-ActualValue ] [-Not] ``` ### FileContentMatch ```powershell -Should [-ActualValue ] [-Not] [-Because ] [-FileContentMatch] [-ExpectedContent ] - [] +Should [[-ExpectedContent] ] [[-Because] ] -FileContentMatch [-ActualValue ] + [-Not] ``` ### FileContentMatchExactly ```powershell -Should [-ActualValue ] [-Not] [-Because ] [-ExpectedContent ] - [-FileContentMatchExactly] [] +Should [[-ExpectedContent] ] [[-Because] ] -FileContentMatchExactly + [-ActualValue ] [-Not] ``` ### FileContentMatchMultiline ```powershell -Should [-ActualValue ] [-Not] [-Because ] [-ExpectedContent ] - [-FileContentMatchMultiline] [] +Should [[-ExpectedContent] ] [[-Because] ] -FileContentMatchMultiline + [-ActualValue ] [-Not] ``` ### HaveCount ```powershell -Should [-ActualValue ] [-Not] [-ExpectedValue ] [-Because ] [-HaveCount] - [] +Should [[-ExpectedValue] ] [[-Because] ] -HaveCount [-ActualValue ] [-Not] ``` ### HaveParameter ```powershell -Should [-ActualValue ] [-Not] [-Because ] [-HaveParameter] [-ParameterName ] - [-Type ] [-DefaultValue ] [-Mandatory] [-HasArgumentCompleter] [] +Should [[-ParameterName] ] [[-Type] ] [[-DefaultValue] ] [-Mandatory] + [-HasArgumentCompleter] [[-Because] ] -HaveParameter [-ActualValue ] [-Not] ``` ### Match ```powershell -Should [-ActualValue ] [-Not] [-Because ] [-Match] [-RegularExpression ] - [] +Should [[-RegularExpression] ] [[-Because] ] -Match [-ActualValue ] [-Not] ``` ### MatchExactly ```powershell -Should [-ActualValue ] [-Not] [-Because ] [-RegularExpression ] [-MatchExactly] - [] +Should [[-RegularExpression] ] [[-Because] ] -MatchExactly [-ActualValue ] + [-Not] ``` ### Throw ```powershell -Should [-ActualValue ] [-Not] [-Because ] [-Throw] [-ExpectedMessage ] - [-ErrorId ] [-ExceptionType ] [-PassThru] [] +Should [[-ExpectedMessage] ] [[-ErrorId] ] [[-ExceptionType] ] + [[-Because] ] [-PassThru] -Throw [-ActualValue ] [-Not] ``` ## DESCRIPTION @@ -210,15 +206,20 @@ PS C:\> {{ Add example code here }} \{\{ Fill __LegacyArg1 Description \}\} ```yaml -Type: Object -Parameter Sets: Legacy -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -__LegacyArg2 @@ -226,15 +227,20 @@ Accept wildcard characters: False \{\{ Fill __LegacyArg2 Description \}\} ```yaml -Type: Object -Parameter Sets: Legacy -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -__LegacyArg3 @@ -242,15 +248,20 @@ Accept wildcard characters: False \{\{ Fill __LegacyArg3 Description \}\} ```yaml -Type: Object -Parameter Sets: Legacy -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ActualValue @@ -258,15 +269,20 @@ Accept wildcard characters: False \{\{ Fill ActualValue Description \}\} ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Be @@ -274,15 +290,21 @@ Accept wildcard characters: False \{\{ Fill Be Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: Be -Aliases: EQ - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- EQ +ParameterSets: +- Name: Be + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Because @@ -290,15 +312,152 @@ Accept wildcard characters: False \{\{ Fill Because Description \}\} ```yaml -Type: Object -Parameter Sets: Be, BeExactly, BeGreaterThan, BeLessOrEqual, BeIn, BeLessThan, BeGreaterOrEqual, BeLike, BeLikeExactly, BeNullOrEmpty, BeOfType, BeTrue, BeFalse, Contain, Exist, FileContentMatch, FileContentMatchExactly, FileContentMatchMultiline, HaveCount, HaveParameter, Match, MatchExactly, Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Be + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeExactly + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterThan + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessOrEqual + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeIn + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessThan + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterOrEqual + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLike + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLikeExactly + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeNullOrEmpty + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeOfType + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeTrue + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeFalse + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Contain + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Exist + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatch + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchExactly + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchMultiline + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: HaveCount + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: HaveParameter + Position: 6 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Match + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: MatchExactly + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Throw + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeExactly @@ -306,15 +465,21 @@ Accept wildcard characters: False \{\{ Fill BeExactly Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: BeExactly -Aliases: CEQ - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- CEQ +ParameterSets: +- Name: BeExactly + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeFalse @@ -322,15 +487,20 @@ Accept wildcard characters: False \{\{ Fill BeFalse Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: BeFalse -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeFalse + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeGreaterOrEqual @@ -338,15 +508,21 @@ Accept wildcard characters: False \{\{ Fill BeGreaterOrEqual Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: BeGreaterOrEqual -Aliases: GE - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- GE +ParameterSets: +- Name: BeGreaterOrEqual + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeGreaterThan @@ -354,15 +530,21 @@ Accept wildcard characters: False \{\{ Fill BeGreaterThan Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: BeGreaterThan -Aliases: GT - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- GT +ParameterSets: +- Name: BeGreaterThan + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeIn @@ -370,15 +552,20 @@ Accept wildcard characters: False \{\{ Fill BeIn Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: BeIn -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeIn + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeLessOrEqual @@ -386,15 +573,21 @@ Accept wildcard characters: False \{\{ Fill BeLessOrEqual Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: BeLessOrEqual -Aliases: LE - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- LE +ParameterSets: +- Name: BeLessOrEqual + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeLessThan @@ -402,15 +595,21 @@ Accept wildcard characters: False \{\{ Fill BeLessThan Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: BeLessThan -Aliases: LT - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- LT +ParameterSets: +- Name: BeLessThan + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeLike @@ -418,15 +617,20 @@ Accept wildcard characters: False \{\{ Fill BeLike Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: BeLike -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeLike + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeLikeExactly @@ -434,15 +638,20 @@ Accept wildcard characters: False \{\{ Fill BeLikeExactly Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: BeLikeExactly -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeLikeExactly + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeNullOrEmpty @@ -450,15 +659,20 @@ Accept wildcard characters: False \{\{ Fill BeNullOrEmpty Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: BeNullOrEmpty -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeNullOrEmpty + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeOfType @@ -466,15 +680,21 @@ Accept wildcard characters: False \{\{ Fill BeOfType Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: BeOfType -Aliases: HaveType - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- HaveType +ParameterSets: +- Name: BeOfType + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeTrue @@ -482,15 +702,20 @@ Accept wildcard characters: False \{\{ Fill BeTrue Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: BeTrue -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeTrue + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Contain @@ -498,15 +723,20 @@ Accept wildcard characters: False \{\{ Fill Contain Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: Contain -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Contain + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -DefaultValue @@ -514,15 +744,20 @@ Accept wildcard characters: False \{\{ Fill DefaultValue Description \}\} ```yaml -Type: Object -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ErrorId @@ -530,15 +765,20 @@ Accept wildcard characters: False \{\{ Fill ErrorId Description \}\} ```yaml -Type: Object -Parameter Sets: Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Throw + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExceptionType @@ -546,15 +786,20 @@ Accept wildcard characters: False \{\{ Fill ExceptionType Description \}\} ```yaml -Type: Object -Parameter Sets: Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Throw + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Exist @@ -562,15 +807,20 @@ Accept wildcard characters: False \{\{ Fill Exist Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: Exist -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Exist + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExpectedContent @@ -578,15 +828,32 @@ Accept wildcard characters: False \{\{ Fill ExpectedContent Description \}\} ```yaml -Type: Object -Parameter Sets: FileContentMatch, FileContentMatchExactly, FileContentMatchMultiline -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FileContentMatch + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchExactly + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchMultiline + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExpectedMessage @@ -594,15 +861,20 @@ Accept wildcard characters: False \{\{ Fill ExpectedMessage Description \}\} ```yaml -Type: Object -Parameter Sets: Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Throw + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExpectedType @@ -610,15 +882,20 @@ Accept wildcard characters: False \{\{ Fill ExpectedType Description \}\} ```yaml -Type: Object -Parameter Sets: BeOfType -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeOfType + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExpectedValue @@ -626,15 +903,80 @@ Accept wildcard characters: False \{\{ Fill ExpectedValue Description \}\} ```yaml -Type: Object -Parameter Sets: Be, BeExactly, BeGreaterThan, BeLessOrEqual, BeIn, BeLessThan, BeGreaterOrEqual, BeLike, BeLikeExactly, Contain, HaveCount -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Be + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeExactly + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterThan + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessOrEqual + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeIn + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessThan + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterOrEqual + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLike + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLikeExactly + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Contain + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: HaveCount + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -FileContentMatch @@ -642,15 +984,20 @@ Accept wildcard characters: False \{\{ Fill FileContentMatch Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: FileContentMatch -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FileContentMatch + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -FileContentMatchExactly @@ -658,15 +1005,20 @@ Accept wildcard characters: False \{\{ Fill FileContentMatchExactly Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: FileContentMatchExactly -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FileContentMatchExactly + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -FileContentMatchMultiline @@ -674,15 +1026,20 @@ Accept wildcard characters: False \{\{ Fill FileContentMatchMultiline Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: FileContentMatchMultiline -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FileContentMatchMultiline + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -HasArgumentCompleter @@ -690,15 +1047,20 @@ Accept wildcard characters: False \{\{ Fill HasArgumentCompleter Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 5 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -HaveCount @@ -706,15 +1068,20 @@ Accept wildcard characters: False \{\{ Fill HaveCount Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: HaveCount -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveCount + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -HaveParameter @@ -722,15 +1089,20 @@ Accept wildcard characters: False \{\{ Fill HaveParameter Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: HaveParameter -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Mandatory @@ -738,15 +1110,20 @@ Accept wildcard characters: False \{\{ Fill Mandatory Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Match @@ -754,15 +1131,20 @@ Accept wildcard characters: False \{\{ Fill Match Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: Match -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Match + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -MatchExactly @@ -770,15 +1152,21 @@ Accept wildcard characters: False \{\{ Fill MatchExactly Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: MatchExactly -Aliases: CMATCH - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- CMATCH +ParameterSets: +- Name: MatchExactly + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Not @@ -786,15 +1174,152 @@ Accept wildcard characters: False \{\{ Fill Not Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: Be, BeExactly, BeGreaterThan, BeLessOrEqual, BeIn, BeLessThan, BeGreaterOrEqual, BeLike, BeLikeExactly, BeNullOrEmpty, BeOfType, BeTrue, BeFalse, Contain, Exist, FileContentMatch, FileContentMatchExactly, FileContentMatchMultiline, HaveCount, HaveParameter, Match, MatchExactly, Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Be + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterThan + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessOrEqual + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeIn + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessThan + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterOrEqual + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLike + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLikeExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeNullOrEmpty + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeOfType + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeTrue + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeFalse + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Contain + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Exist + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatch + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchMultiline + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: HaveCount + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: HaveParameter + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Match + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: MatchExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Throw + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ParameterName @@ -802,15 +1327,20 @@ Accept wildcard characters: False \{\{ Fill ParameterName Description \}\} ```yaml -Type: Object -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -PassThru @@ -818,15 +1348,20 @@ Accept wildcard characters: False \{\{ Fill PassThru Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Throw + Position: 5 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -RegularExpression @@ -834,15 +1369,26 @@ Accept wildcard characters: False \{\{ Fill RegularExpression Description \}\} ```yaml -Type: Object -Parameter Sets: Match, MatchExactly -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Match + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: MatchExactly + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Throw @@ -850,15 +1396,20 @@ Accept wildcard characters: False \{\{ Fill Throw Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: Throw -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Throw + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Type @@ -866,29 +1417,39 @@ Accept wildcard characters: False \{\{ Fill Type Description \}\} ```yaml -Type: Object -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES ## RELATED LINKS -## EDIT THIS PAGE +## VERSION -This page was auto-generated using Pester's comment based help. To edit the content of this page, change the corresponding help in the [pester/Pester v4](https://github.com/pester/Pester/tree/rel/4.x.x) repository. See our [contribution guide](https://github.com/pester/docs#contributing) for more information. +*This page was generated using comment-based help in [Pester 4.10.1](https://github.com/pester/pester).* diff --git a/versioned_docs/version-v4/commands/docusaurus.sidebar.js b/versioned_docs/version-v4/commands/docusaurus.sidebar.js index 977f3a52..54877fd0 100644 --- a/versioned_docs/version-v4/commands/docusaurus.sidebar.js +++ b/versioned_docs/version-v4/commands/docusaurus.sidebar.js @@ -1,7 +1,7 @@ /** * Import this file in your Docusaurus `sidebars.js` file. * - * Auto-generated by Alt3.Powershell.Docusaurus. + * Auto-generated by Alt3.Docusaurus.Powershell 2.0.0. * * Copyright (c) 2019-present, ALT3 B.V. * From 16c7494ad22ee3f7234c2f7aa929e5dad6147859 Mon Sep 17 00:00:00 2001 From: Frode Flaten <3436158+fflaten@users.noreply.github.com> Date: Mon, 27 Jul 2026 01:15:04 +0200 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: Frode Flaten <3436158+fflaten@users.noreply.github.com> --- versioned_docs/version-v4/commands/Add-AssertionOperator.mdx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/versioned_docs/version-v4/commands/Add-AssertionOperator.mdx b/versioned_docs/version-v4/commands/Add-AssertionOperator.mdx index d51df92f..0bcdf62d 100644 --- a/versioned_docs/version-v4/commands/Add-AssertionOperator.mdx +++ b/versioned_docs/version-v4/commands/Add-AssertionOperator.mdx @@ -1,5 +1,8 @@ --- -id: Add-AssertionOperator +# Override id to have common docId for Commands navbar-link for all versions +id: Add-ShouldOperator +# Override slug so url matches v4 name +slug: Add-AssertionOperator title: Add-AssertionOperator description: Help for Pester command 'Add-AssertionOperator'. Register an Assertion Operator with Pester keywords: From d1d9f5e35328a2bde1d2b59e919e8deb5512a331 Mon Sep 17 00:00:00 2001 From: Frode Flaten <3436158+fflaten@users.noreply.github.com> Date: Mon, 27 Jul 2026 01:57:11 +0200 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: Frode Flaten <3436158+fflaten@users.noreply.github.com> --- versioned_docs/version-v4/commands/Setup.mdx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/versioned_docs/version-v4/commands/Setup.mdx b/versioned_docs/version-v4/commands/Setup.mdx index 1069c55a..dbf3735d 100644 --- a/versioned_docs/version-v4/commands/Setup.mdx +++ b/versioned_docs/version-v4/commands/Setup.mdx @@ -1,7 +1,7 @@ --- id: Setup title: Setup -description: Help for Pester command 'Setup'. {{ Fill in the Synopsis }} +description: Help for Pester command 'Setup'. This command is included in the Pester Mocking framework for backwards compatibility. You do not need to call it directly. keywords: - PowerShell - Pester @@ -18,7 +18,8 @@ Contributions are welcome in [Pester-repo](https://github.com/pester/pester). ## SYNOPSIS -\{\{ Fill in the Synopsis \}\} +This command is included in the Pester Mocking framework for backwards compatibility. +You do not need to call it directly ## SYNTAX