diff --git a/docs/commands/Add-ShouldOperator.mdx b/docs/commands/Add-ShouldOperator.mdx index 8548e00d..7ec0625b 100644 --- a/docs/commands/Add-ShouldOperator.mdx +++ b/docs/commands/Add-ShouldOperator.mdx @@ -1,7 +1,7 @@ --- id: Add-ShouldOperator title: Add-ShouldOperator -description: Help page for the PowerShell Pester "Add-ShouldOperator" command +description: Help for Pester command 'Add-ShouldOperator'. Register a Should Operator with Pester keywords: - PowerShell - Pester @@ -23,8 +23,8 @@ Register a Should Operator with Pester ## SYNTAX ```powershell -Add-ShouldOperator [-Name] [-Test] [[-Alias] ] [[-InternalName] ] - [-SupportsArrayInput] [] +Add-ShouldOperator [-Name] [-Test] [[-Alias] ] + [[-InternalName] ] [-SupportsArrayInput] ``` ## DESCRIPTION @@ -67,92 +67,120 @@ Example of how to create a simple custom assertion that checks if the input stri ## PARAMETERS -### -Name +### -Alias -The name of the assertion. -This will become a Named Parameter of Should. +A list of aliases for the Named Parameter. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Test +### -InternalName -The test function. -The function must return a PSObject with a [Bool]succeeded and a [string]failureMessage property. +If -Name is different from the actual function name, record the actual function name here. +Used by Get-ShouldOperator to pull function help. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Alias +### -Name -A list of aliases for the Named Parameter. +The name of the assertion. +This will become a Named Parameter of Should. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -InternalName +### -SupportsArrayInput -If -Name is different from the actual function name, record the actual function name here. -Used by Get-ShouldOperator to pull function help. +Does the test function support the passing an array of values to test. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -SupportsArrayInput +### -Test -Does the test function support the passing an array of values to test. +The test function. +The function must return a PSObject with a [Bool]succeeded and a [string]failureMessage property. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -162,8 +190,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/Add-ShouldOperator](https://pester.dev/docs/commands/Add-ShouldOperator) +- [https://pester.dev/docs/commands/Add-ShouldOperator](https://pester.dev/docs/commands/Add-ShouldOperator) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/AfterAll.mdx b/docs/commands/AfterAll.mdx index 9b4dff22..b2b95786 100644 --- a/docs/commands/AfterAll.mdx +++ b/docs/commands/AfterAll.mdx @@ -1,7 +1,7 @@ --- id: AfterAll title: AfterAll -description: Help page for the PowerShell Pester "AfterAll" command +description: Help for Pester command 'AfterAll'. Defines a series of steps to perform at the end of the current container, Context or Describe block. keywords: - PowerShell - Pester @@ -24,7 +24,7 @@ Context or Describe block. ## SYNTAX ```powershell -AfterAll [-Scriptblock] [] +AfterAll [-Scriptblock] ``` ## DESCRIPTION @@ -78,20 +78,28 @@ the tests in the Describe-block. A scriptblock with steps to be executed during teardown. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -101,10 +109,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/AfterAll](https://pester.dev/docs/commands/AfterAll) - -[https://pester.dev/docs/usage/setup-and-teardown](https://pester.dev/docs/usage/setup-and-teardown) +- [https://pester.dev/docs/commands/AfterAll](https://pester.dev/docs/commands/AfterAll) +- [https://pester.dev/docs/usage/setup-and-teardown](https://pester.dev/docs/usage/setup-and-teardown) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/AfterEach.mdx b/docs/commands/AfterEach.mdx index b1e89855..98380ebd 100644 --- a/docs/commands/AfterEach.mdx +++ b/docs/commands/AfterEach.mdx @@ -1,7 +1,7 @@ --- id: AfterEach title: AfterEach -description: Help page for the PowerShell Pester "AfterEach" command +description: Help for Pester command 'AfterEach'. Defines a series of steps to perform at the end of every It block within the current Context or Describe block. keywords: - PowerShell - Pester @@ -24,7 +24,7 @@ the current Context or Describe block. ## SYNTAX ```powershell -AfterEach [-Scriptblock] [] +AfterEach [-Scriptblock] ``` ## DESCRIPTION @@ -75,20 +75,28 @@ The example uses AfterEach to remove a temporary file after each test. A scriptblock with steps to be executed during teardown. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -98,10 +106,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/AfterEach](https://pester.dev/docs/commands/AfterEach) - -[https://pester.dev/docs/usage/setup-and-teardown](https://pester.dev/docs/usage/setup-and-teardown) +- [https://pester.dev/docs/commands/AfterEach](https://pester.dev/docs/commands/AfterEach) +- [https://pester.dev/docs/usage/setup-and-teardown](https://pester.dev/docs/usage/setup-and-teardown) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/BeforeAll.mdx b/docs/commands/BeforeAll.mdx index b92b32c1..a4b61aaf 100644 --- a/docs/commands/BeforeAll.mdx +++ b/docs/commands/BeforeAll.mdx @@ -1,7 +1,7 @@ --- id: BeforeAll title: BeforeAll -description: Help page for the PowerShell Pester "BeforeAll" command +description: Help for Pester command 'BeforeAll'. Defines a series of steps to perform at the beginning of the current container, Context or Describe block. keywords: - PowerShell - Pester @@ -24,7 +24,7 @@ Context or Describe block. ## SYNTAX ```powershell -BeforeAll [-Scriptblock] [] +BeforeAll [-Scriptblock] ``` ## DESCRIPTION @@ -87,20 +87,28 @@ the results in separate tests. A scriptblock with steps to be executed during setup. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -110,10 +118,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/BeforeAll](https://pester.dev/docs/commands/BeforeAll) - -[https://pester.dev/docs/usage/setup-and-teardown](https://pester.dev/docs/usage/setup-and-teardown) +- [https://pester.dev/docs/commands/BeforeAll](https://pester.dev/docs/commands/BeforeAll) +- [https://pester.dev/docs/usage/setup-and-teardown](https://pester.dev/docs/usage/setup-and-teardown) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/BeforeDiscovery.mdx b/docs/commands/BeforeDiscovery.mdx index 9da8056b..f88a8ef0 100644 --- a/docs/commands/BeforeDiscovery.mdx +++ b/docs/commands/BeforeDiscovery.mdx @@ -1,7 +1,7 @@ --- id: BeforeDiscovery title: BeforeDiscovery -description: Help page for the PowerShell Pester "BeforeDiscovery" command +description: Help for Pester command 'BeforeDiscovery'. Runs setup code that is used during Discovery phase. keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Runs setup code that is used during Discovery phase. ## SYNTAX ```powershell -BeforeDiscovery [-ScriptBlock] [] +BeforeDiscovery [-ScriptBlock] ``` ## DESCRIPTION @@ -65,20 +65,28 @@ dynamically create a Describe-block and tests for each file found. The ScriptBlock to run. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -88,10 +96,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/BeforeDiscovery](https://pester.dev/docs/commands/BeforeDiscovery) - -[https://pester.dev/docs/usage/data-driven-tests](https://pester.dev/docs/usage/data-driven-tests) +- [https://pester.dev/docs/commands/BeforeDiscovery](https://pester.dev/docs/commands/BeforeDiscovery) +- [https://pester.dev/docs/usage/data-driven-tests](https://pester.dev/docs/usage/data-driven-tests) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/BeforeEach.mdx b/docs/commands/BeforeEach.mdx index a2f7f02e..f3b3ad21 100644 --- a/docs/commands/BeforeEach.mdx +++ b/docs/commands/BeforeEach.mdx @@ -1,7 +1,7 @@ --- id: BeforeEach title: BeforeEach -description: Help page for the PowerShell Pester "BeforeEach" command +description: Help for Pester command 'BeforeEach'. Defines a series of steps to perform at the beginning of every It block within the current Context or Describe block. keywords: - PowerShell - Pester @@ -24,7 +24,7 @@ the current Context or Describe block. ## SYNTAX ```powershell -BeforeEach [-Scriptblock] [] +BeforeEach [-Scriptblock] ``` ## DESCRIPTION @@ -72,20 +72,28 @@ The example uses BeforeEach to ensure a clean sample-file is used for each test. A scriptblock with steps to be executed during setup. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -95,10 +103,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/BeforeEach](https://pester.dev/docs/commands/BeforeEach) - -[https://pester.dev/docs/usage/setup-and-teardown](https://pester.dev/docs/usage/setup-and-teardown) +- [https://pester.dev/docs/commands/BeforeEach](https://pester.dev/docs/commands/BeforeEach) +- [https://pester.dev/docs/usage/setup-and-teardown](https://pester.dev/docs/usage/setup-and-teardown) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Context.mdx b/docs/commands/Context.mdx index 11bb5b04..a51631ee 100644 --- a/docs/commands/Context.mdx +++ b/docs/commands/Context.mdx @@ -1,7 +1,7 @@ --- id: Context title: Context -description: Help page for the PowerShell Pester "Context" command +description: Help for Pester command 'Context'. Provides logical grouping of It blocks within a single Describe block. keywords: - PowerShell - Pester @@ -23,8 +23,8 @@ Provides logical grouping of It blocks within a single Describe block. ## SYNTAX ```powershell -Context [-Name] [-Tag ] [[-Fixture] ] [-Skip] [-AllowNullOrEmptyForEach] - [-ForEach ] [] +Context [-Name] [[-Fixture] ] [-Tag ] [-Skip] + [-AllowNullOrEmptyForEach] [-ForEach ] ``` ## DESCRIPTION @@ -69,40 +69,26 @@ Example of how to use Context for grouping different tests ## PARAMETERS -### -Name - -The name of the Context. -This is a phrase describing a set of tests within a describe. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tag +### -AllowNullOrEmptyForEach -Optional parameter containing an array of strings. -When calling Invoke-Pester, -it is possible to specify a -Tag parameter which will only execute Context blocks -containing the same Tag. +Allows empty or null values for -ForEach when Run.FailOnNullOrEmptyForEach is enabled. +This might be excepted in certain scenarios like using external data. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: Tags - -Required: False -Position: Named -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Fixture @@ -112,75 +98,123 @@ This may include setup specific to the context and one or more It blocks that validate the expected outcomes. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Skip +### -ForEach -Use this parameter to explicitly mark the block to be skipped. -This is preferable to temporarily -commenting out a block, because it remains listed in the output. +Allows data driven tests to be written. +Takes an array of data and generates one block for each item in the array, and makes the item +available as $_ in all child blocks. +When the array is an array of hashtables, it additionally +defines each key in the hashtable as variable. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -AllowNullOrEmptyForEach +### -Name -Allows empty or null values for -ForEach when Run.FailOnNullOrEmptyForEach is enabled. -This might be excepted in certain scenarios like using external data. +The name of the Context. +This is a phrase describing a set of tests within a describe. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Skip + +Use this parameter to explicitly mark the block to be skipped. +This is preferable to temporarily +commenting out a block, because it remains listed in the output. -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +```yaml +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ForEach +### -Tag -Allows data driven tests to be written. -Takes an array of data and generates one block for each item in the array, and makes the item -available as $_ in all child blocks. -When the array is an array of hashtables, it additionally -defines each key in the hashtable as variable. +Optional parameter containing an array of strings. +When calling Invoke-Pester, +it is possible to specify a -Tag parameter which will only execute Context blocks +containing the same Tag. ```yaml -Type: Object -Parameter Sets: (All) +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +- Tags +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -190,14 +224,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/Context](https://pester.dev/docs/commands/Context) - -[https://pester.dev/docs/usage/test-file-structure](https://pester.dev/docs/usage/test-file-structure) - -[https://pester.dev/docs/usage/mocking](https://pester.dev/docs/usage/mocking) - -[https://pester.dev/docs/usage/testdrive](https://pester.dev/docs/usage/testdrive) +- [https://pester.dev/docs/commands/Context](https://pester.dev/docs/commands/Context) +- [https://pester.dev/docs/usage/test-file-structure](https://pester.dev/docs/usage/test-file-structure) +- [https://pester.dev/docs/usage/mocking](https://pester.dev/docs/usage/mocking) +- [https://pester.dev/docs/usage/testdrive](https://pester.dev/docs/usage/testdrive) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/ConvertTo-JUnitReport.mdx b/docs/commands/ConvertTo-JUnitReport.mdx index 5feff896..e75f9ae3 100644 --- a/docs/commands/ConvertTo-JUnitReport.mdx +++ b/docs/commands/ConvertTo-JUnitReport.mdx @@ -1,7 +1,7 @@ --- id: ConvertTo-JUnitReport title: ConvertTo-JUnitReport -description: Help page for the PowerShell Pester "ConvertTo-JUnitReport" command +description: Help for Pester command 'ConvertTo-JUnitReport'. Converts a Pester result-object to an JUnit-compatible XML report keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Converts a Pester result-object to an JUnit-compatible XML report ## SYNTAX ```powershell -ConvertTo-JUnitReport [-Result] [-AsString] [] +ConvertTo-JUnitReport [-Result] [-AsString] ``` ## DESCRIPTION @@ -66,59 +66,74 @@ The returned object is a string. ## PARAMETERS -### -Result +### -AsString -Result object from a Pester-run. -This can be retrieved using Invoke-Pester --Passthru or by using the Run.PassThru configuration-option. +Returns the XML-report as a string. ```yaml -Type: Run -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -AsString +### -Result -Returns the XML-report as a string. +Result object from a Pester-run. +This can be retrieved using Invoke-Pester +-Passthru or by using the Run.PassThru configuration-option. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: Pester.Run +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### Pester.Run + ## OUTPUTS ### System.Xml.XmlDocument ### System.String + ## NOTES ## RELATED LINKS -[https://pester.dev/docs/commands/ConvertTo-JUnitReport](https://pester.dev/docs/commands/ConvertTo-JUnitReport) - -[https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) +- [https://pester.dev/docs/commands/ConvertTo-JUnitReport](https://pester.dev/docs/commands/ConvertTo-JUnitReport) +- [https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/ConvertTo-NUnitReport.mdx b/docs/commands/ConvertTo-NUnitReport.mdx index 31a0d9c9..981465cb 100644 --- a/docs/commands/ConvertTo-NUnitReport.mdx +++ b/docs/commands/ConvertTo-NUnitReport.mdx @@ -1,7 +1,7 @@ --- id: ConvertTo-NUnitReport title: ConvertTo-NUnitReport -description: Help page for the PowerShell Pester "ConvertTo-NUnitReport" command +description: Help for Pester command 'ConvertTo-NUnitReport'. Converts a Pester result-object to an NUnit 2.5 or 3-compatible XML-report keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Converts a Pester result-object to an NUnit 2.5 or 3-compatible XML-report ## SYNTAX ```powershell -ConvertTo-NUnitReport [-Result] [-AsString] [[-Format] ] [] +ConvertTo-NUnitReport [-Result] [[-Format] ] [-AsString] ``` ## DESCRIPTION @@ -77,75 +77,95 @@ The returned object is a string. ## PARAMETERS -### -Result +### -AsString -Result object from a Pester-run. -This can be retrieved using Invoke-Pester --Passthru or by using the Run.PassThru configuration-option. +Returns the XML-report as a string. ```yaml -Type: Run -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -AsString +### -Format -Returns the XML-report as a string. +Specifies the NUnit-schema to be used. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: NUnit2.5 +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Format +### -Result -Specifies the NUnit-schema to be used. +Result object from a Pester-run. +This can be retrieved using Invoke-Pester +-Passthru or by using the Run.PassThru configuration-option. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: NUnit2.5 -Accept pipeline input: False -Accept wildcard characters: False +Type: Pester.Run +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### Pester.Run + ## OUTPUTS ### System.Xml.XmlDocument ### System.String + ## NOTES ## RELATED LINKS -[https://pester.dev/docs/commands/ConvertTo-NUnitReport](https://pester.dev/docs/commands/ConvertTo-NUnitReport) - -[https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) +- [https://pester.dev/docs/commands/ConvertTo-NUnitReport](https://pester.dev/docs/commands/ConvertTo-NUnitReport) +- [https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/ConvertTo-Pester4Result.mdx b/docs/commands/ConvertTo-Pester4Result.mdx index 2fcdcd98..a8c39efc 100644 --- a/docs/commands/ConvertTo-Pester4Result.mdx +++ b/docs/commands/ConvertTo-Pester4Result.mdx @@ -1,7 +1,7 @@ --- id: ConvertTo-Pester4Result title: ConvertTo-Pester4Result -description: Help page for the PowerShell Pester "ConvertTo-Pester4Result" command +description: Help for Pester command 'ConvertTo-Pester4Result'. Converts a Pester 5 result-object to an Pester 4-compatible object keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Converts a Pester 5 result-object to an Pester 4-compatible object ## SYNTAX ```powershell -ConvertTo-Pester4Result [-PesterResult] [] +ConvertTo-Pester4Result [-PesterResult] ``` ## DESCRIPTION @@ -57,33 +57,42 @@ This can be retrieved using Invoke-Pester -Passthru or by using the Run.PassThru configuration-option. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES ## RELATED LINKS -[https://pester.dev/docs/commands/ConvertTo-Pester4Result](https://pester.dev/docs/commands/ConvertTo-Pester4Result) - -[https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) +- [https://pester.dev/docs/commands/ConvertTo-Pester4Result](https://pester.dev/docs/commands/ConvertTo-Pester4Result) +- [https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Describe.mdx b/docs/commands/Describe.mdx index 51ebcfaa..52a1eb7a 100644 --- a/docs/commands/Describe.mdx +++ b/docs/commands/Describe.mdx @@ -1,7 +1,7 @@ --- id: Describe title: Describe -description: Help page for the PowerShell Pester "Describe" command +description: Help for Pester command 'Describe'. Creates a logical group of tests. keywords: - PowerShell - Pester @@ -23,8 +23,8 @@ Creates a logical group of tests. ## SYNTAX ```powershell -Describe [-Name] [-Tag ] [[-Fixture] ] [-Skip] [-AllowNullOrEmptyForEach] - [-ForEach ] [] +Describe [-Name] [[-Fixture] ] [-Tag ] [-Skip] + [-AllowNullOrEmptyForEach] [-ForEach ] ``` ## DESCRIPTION @@ -32,8 +32,8 @@ Describe [-Name] [-Tag ] [[-Fixture] ] [-Skip] [ Creates a logical group of tests. All Mocks, TestDrive and TestRegistry contents defined within a Describe block are scoped to that Describe; they -will no longer be present when the Describe block exits. -A Describe +will no longer be present when the Describe block exits. + A Describe block may contain any number of Context and It blocks. ## EXAMPLES @@ -74,41 +74,26 @@ Using Describe to group tests logically at the root of the script/container ## PARAMETERS -### -Name - -The name of the test group. -This is often an expressive phrase describing -the scenario being tested. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tag +### -AllowNullOrEmptyForEach -Optional parameter containing an array of strings. -When calling Invoke-Pester, -it is possible to specify a -Tag parameter which will only execute Describe blocks -containing the same Tag. +Allows empty or null values for -ForEach when Run.FailOnNullOrEmptyForEach is enabled. +This might be excepted in certain scenarios like using external data. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: Tags - -Required: False -Position: Named -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Fixture @@ -122,75 +107,124 @@ Assertions are typically performed by the Should command within the It blocks. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Skip +### -ForEach -Use this parameter to explicitly mark the block to be skipped. -This is preferable to temporarily -commenting out a block, because it remains listed in the output. +Allows data driven tests to be written. +Takes an array of data and generates one block for each item in the array, and makes the item +available as $_ in all child blocks. +When the array is an array of hashtables, it additionally +defines each key in the hashtable as variable. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -AllowNullOrEmptyForEach +### -Name -Allows empty or null values for -ForEach when Run.FailOnNullOrEmptyForEach is enabled. -This might be excepted in certain scenarios like using external data. +The name of the test group. +This is often an expressive phrase describing +the scenario being tested. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Skip + +Use this parameter to explicitly mark the block to be skipped. +This is preferable to temporarily +commenting out a block, because it remains listed in the output. -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +```yaml +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ForEach +### -Tag -Allows data driven tests to be written. -Takes an array of data and generates one block for each item in the array, and makes the item -available as $_ in all child blocks. -When the array is an array of hashtables, it additionally -defines each key in the hashtable as variable. +Optional parameter containing an array of strings. +When calling Invoke-Pester, +it is possible to specify a -Tag parameter which will only execute Describe blocks +containing the same Tag. ```yaml -Type: Object -Parameter Sets: (All) +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +- Tags +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -200,14 +234,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/Describe](https://pester.dev/docs/commands/Describe) - -[https://pester.dev/docs/usage/test-file-structure](https://pester.dev/docs/usage/test-file-structure) - -[https://pester.dev/docs/usage/mocking](https://pester.dev/docs/usage/mocking) - -[https://pester.dev/docs/usage/testdrive](https://pester.dev/docs/usage/testdrive) +- [https://pester.dev/docs/commands/Describe](https://pester.dev/docs/commands/Describe) +- [https://pester.dev/docs/usage/test-file-structure](https://pester.dev/docs/usage/test-file-structure) +- [https://pester.dev/docs/usage/mocking](https://pester.dev/docs/usage/mocking) +- [https://pester.dev/docs/usage/testdrive](https://pester.dev/docs/usage/testdrive) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Export-JUnitReport.mdx b/docs/commands/Export-JUnitReport.mdx index df9e3822..a8892d77 100644 --- a/docs/commands/Export-JUnitReport.mdx +++ b/docs/commands/Export-JUnitReport.mdx @@ -1,7 +1,7 @@ --- id: Export-JUnitReport title: Export-JUnitReport -description: Help page for the PowerShell Pester "Export-JUnitReport" command +description: Help for Pester command 'Export-JUnitReport'. Exports a Pester result-object to an JUnit-compatible XML-report keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Exports a Pester result-object to an JUnit-compatible XML-report ## SYNTAX ```powershell -Export-JUnitReport [-Result] [-Path] [] +Export-JUnitReport [-Result] [-Path] ``` ## DESCRIPTION @@ -53,56 +53,70 @@ exports it as an JUnit 4-compatible XML-report. ## PARAMETERS -### -Result +### -Path -Result object from a Pester-run. -This can be retrieved using Invoke-Pester --Passthru or by using the Run.PassThru configuration-option. +The path where the XML-report should be saved. ```yaml -Type: Run -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Path +### -Result -The path where the XML-report should be saved. +Result object from a Pester-run. +This can be retrieved using Invoke-Pester +-Passthru or by using the Run.PassThru configuration-option. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: Pester.Run +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### Pester.Run + ## OUTPUTS ## NOTES ## RELATED LINKS -[https://pester.dev/docs/commands/Export-JUnitReport](https://pester.dev/docs/commands/Export-JUnitReport) - -[https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) +- [https://pester.dev/docs/commands/Export-JUnitReport](https://pester.dev/docs/commands/Export-JUnitReport) +- [https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Export-NUnitReport.mdx b/docs/commands/Export-NUnitReport.mdx index 455bfdd4..108f76d8 100644 --- a/docs/commands/Export-NUnitReport.mdx +++ b/docs/commands/Export-NUnitReport.mdx @@ -1,7 +1,7 @@ --- id: Export-NUnitReport title: Export-NUnitReport -description: Help page for the PowerShell Pester "Export-NUnitReport" command +description: Help for Pester command 'Export-NUnitReport'. Exports a Pester result-object to an NUnit-compatible XML-report keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Exports a Pester result-object to an NUnit-compatible XML-report ## SYNTAX ```powershell -Export-NUnitReport [-Result] [-Path] [[-Format] ] [] +Export-NUnitReport [-Result] [-Path] [[-Format] ] ``` ## DESCRIPTION @@ -53,22 +53,25 @@ exports it as an NUnit 2.5-compatible XML-report. ## PARAMETERS -### -Result +### -Format -Result object from a Pester-run. -This can be retrieved using Invoke-Pester --Passthru or by using the Run.PassThru configuration-option. +Specifies the NUnit-schema to be used. ```yaml -Type: Run -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.String +DefaultValue: NUnit2.5 +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Path @@ -76,49 +79,65 @@ Accept wildcard characters: False The path where the XML-report should be saved. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Format +### -Result -Specifies the NUnit-schema to be used. +Result object from a Pester-run. +This can be retrieved using Invoke-Pester +-Passthru or by using the Run.PassThru configuration-option. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: NUnit2.5 -Accept pipeline input: False -Accept wildcard characters: False +Type: Pester.Run +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### Pester.Run + ## OUTPUTS ## NOTES ## RELATED LINKS -[https://pester.dev/docs/commands/Export-NUnitReport](https://pester.dev/docs/commands/Export-NUnitReport) - -[https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) +- [https://pester.dev/docs/commands/Export-NUnitReport](https://pester.dev/docs/commands/Export-NUnitReport) +- [https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Get-ShouldOperator.mdx b/docs/commands/Get-ShouldOperator.mdx index 1e89c917..b75b6ae5 100644 --- a/docs/commands/Get-ShouldOperator.mdx +++ b/docs/commands/Get-ShouldOperator.mdx @@ -1,7 +1,7 @@ --- id: Get-ShouldOperator title: Get-ShouldOperator -description: Help page for the PowerShell Pester "Get-ShouldOperator" command +description: Help for Pester command 'Get-ShouldOperator'. Display the assertion operators available for use with Should. keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Display the assertion operators available for use with Should. ## SYNTAX ```powershell -Get-ShouldOperator [-Name ] [] +Get-ShouldOperator [[-Name] ] ``` ## DESCRIPTION @@ -60,20 +60,28 @@ Return help examples for the Be assertion operator. Name or alias of operator ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -88,10 +96,9 @@ standard PowerShell discovery patterns (like `Get-Help Should -Parameter *`). ## RELATED LINKS -[https://pester.dev/docs/commands/Get-ShouldOperator](https://pester.dev/docs/commands/Get-ShouldOperator) - -[https://pester.dev/docs/commands/Should](https://pester.dev/docs/commands/Should) +- [https://pester.dev/docs/commands/Get-ShouldOperator](https://pester.dev/docs/commands/Get-ShouldOperator) +- [https://pester.dev/docs/commands/Should](https://pester.dev/docs/commands/Should) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/InModuleScope.mdx b/docs/commands/InModuleScope.mdx index 3d745a78..e83d321a 100644 --- a/docs/commands/InModuleScope.mdx +++ b/docs/commands/InModuleScope.mdx @@ -1,7 +1,7 @@ --- id: InModuleScope title: InModuleScope -description: Help page for the PowerShell Pester "InModuleScope" command +description: Help for Pester command 'InModuleScope'. Allows you to execute parts of a test script within the scope of a PowerShell script or manifest module. keywords: - PowerShell - Pester @@ -24,8 +24,8 @@ scope of a PowerShell script or manifest module. ## SYNTAX ```powershell -InModuleScope [-ModuleName] [-ScriptBlock] [[-Parameters] ] - [[-ArgumentList] ] [] +InModuleScope [-ModuleName] [-ScriptBlock] [[-Parameters] ] + [[-ArgumentList] ] ``` ## DESCRIPTION @@ -122,39 +122,49 @@ them in using `-Parameters` or `-ArgumentList`. ## PARAMETERS -### -ModuleName +### -ArgumentList -The name of the module into which the test code should be -injected. -This module must already be loaded into the current -PowerShell session. +A optional list of arguments to be passed to the scriptblock. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object[] +DefaultValue: '@()' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ScriptBlock +### -ModuleName -The code to be executed within the script or manifest module. +The name of the module into which the test code should be +injected. +This module must already be loaded into the current +PowerShell session. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Parameters @@ -163,36 +173,49 @@ A optional hashtable of parameters to be passed to the scriptblock. Parameters are automatically made available as variables in the scriptblock. ```yaml -Type: Hashtable -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: @{} -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Collections.Hashtable +DefaultValue: '@{}' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ArgumentList +### -ScriptBlock -A optional list of arguments to be passed to the scriptblock. +The code to be executed within the script or manifest module. ```yaml -Type: Object[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -202,8 +225,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/InModuleScope](https://pester.dev/docs/commands/InModuleScope) +- [https://pester.dev/docs/commands/InModuleScope](https://pester.dev/docs/commands/InModuleScope) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Invoke-Pester.mdx b/docs/commands/Invoke-Pester.mdx index f6a50027..63b3e852 100644 --- a/docs/commands/Invoke-Pester.mdx +++ b/docs/commands/Invoke-Pester.mdx @@ -1,7 +1,7 @@ --- id: Invoke-Pester title: Invoke-Pester -description: Help page for the PowerShell Pester "Invoke-Pester" command +description: Help for Pester command 'Invoke-Pester'. Runs Pester tests keywords: - PowerShell - Pester @@ -25,15 +25,15 @@ Runs Pester tests ### Simple (Default) ```powershell -Invoke-Pester [[-Path] ] [-ExcludePath ] [-TagFilter ] - [-ExcludeTagFilter ] [-FullNameFilter ] [-CI] [-Output ] [-PassThru] - [-Container ] [] +Invoke-Pester [[-Path] ] [-ExcludePath ] [-TagFilter ] + [-ExcludeTagFilter ] [-FullNameFilter ] [-CI] [-Output ] [-PassThru] + [-Container ] ``` ### Advanced ```powershell -Invoke-Pester [-Configuration ] [] +Invoke-Pester [-Configuration ] ``` ## DESCRIPTION @@ -121,58 +121,101 @@ to see other testresult options like output path and format and their default v ## PARAMETERS -### -Path +### -CI -Specifies one or more paths to files containing tests. -The value is a path\file -name or name pattern. -Wildcards are permitted. +Enable Test Results and Exit after Run. + +Equivalent to setting: + TestResult.Enabled = $true + Run.Exit = $true + +To also enable CodeCoverage use this configuration option: + CodeCoverage.Enabled = $true ```yaml -Type: String[] -Parameter Sets: Simple -Aliases: - -Required: False -Position: 1 -Default value: . -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ExcludePath +### -Configuration -Specifies one or more paths to exclude from the test run. -Equivalent to ConfigurationProperty Run.ExcludePath. +[PesterConfiguration] object for Advanced Configuration created using `New-PesterConfiguration`. +For help on each option see about_PesterConfiguration or inspect the object. ```yaml -Type: String[] -Parameter Sets: Simple -Aliases: - -Required: False -Position: Named -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: PesterConfiguration +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Advanced + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -TagFilter +### -Container -Specifies tags to include in the test run. -Only tests with matching tags will run. -Equivalent to ConfigurationProperty Filter.Tag. +Specifies one or more ContainerInfo-objects that define containers with tests. +ContainerInfo-objects are generated using New-PesterContainer. +Useful for +scenarios where data-driven test are generated, e.g. +parametrized test files. ```yaml -Type: String[] -Parameter Sets: Simple -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: Pester.ContainerInfo[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -ExcludePath + +Specifies one or more paths to exclude from the test run. +Equivalent to ConfigurationProperty Run.ExcludePath. + +```yaml +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExcludeTagFilter @@ -181,15 +224,20 @@ Specifies tags to exclude from the test run. Equivalent to ConfigurationProperty Filter.ExcludeTag. ```yaml -Type: String[] -Parameter Sets: Simple -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -FullNameFilter @@ -198,38 +246,20 @@ Specifies test full names (including Describe/Context/It path) to run. Equivalent to ConfigurationProperty Filter.FullName. ```yaml -Type: String[] -Parameter Sets: Simple -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CI - -Enable Test Results and Exit after Run. - -Equivalent to setting: - TestResult.Enabled = $true - Run.Exit = $true - -To also enable CodeCoverage use this configuration option: - CodeCoverage.Enabled = $true - -```yaml -Type: SwitchParameter -Parameter Sets: Simple -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Output @@ -241,15 +271,20 @@ Equivalent to ConfigurationProperty Output.Verbosity. Default value is: Normal ```yaml -Type: String -Parameter Sets: Simple -Aliases: - -Required: False -Position: Named -Default value: Normal -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: Normal +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -PassThru @@ -262,57 +297,75 @@ Equivalent to ConfigurationProperty Run.PassThru. To suppress the host output, use the Output parameter with value None. ```yaml -Type: SwitchParameter -Parameter Sets: Simple -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Container +### -Path -Specifies one or more ContainerInfo-objects that define containers with tests. -ContainerInfo-objects are generated using New-PesterContainer. -Useful for -scenarios where data-driven test are generated, e.g. -parametrized test files. +Specifies one or more paths to files containing tests. +The value is a path\file +name or name pattern. +Wildcards are permitted. ```yaml -Type: ContainerInfo[] -Parameter Sets: Simple -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: . +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Simple + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Configuration +### -TagFilter -[PesterConfiguration] object for Advanced Configuration created using `New-PesterConfiguration`. -For help on each option see about_PesterConfiguration or inspect the object. +Specifies tags to include in the test run. +Only tests with matching tags will run. +Equivalent to ConfigurationProperty Filter.Tag. ```yaml -Type: PesterConfiguration -Parameter Sets: Advanced -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -324,10 +377,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) - -[https://pester.dev/docs/quick-start](https://pester.dev/docs/quick-start) +- [https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) +- [https://pester.dev/docs/quick-start](https://pester.dev/docs/quick-start) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/It.mdx b/docs/commands/It.mdx index 0c39ed4e..5286d519 100644 --- a/docs/commands/It.mdx +++ b/docs/commands/It.mdx @@ -1,7 +1,7 @@ --- id: It title: It -description: Help page for the PowerShell Pester "It" command +description: Help for Pester command 'It'. Validates the results of a test inside of a Describe block. keywords: - PowerShell - Pester @@ -25,15 +25,15 @@ Validates the results of a test inside of a Describe block. ### Normal (Default) ```powershell -It [-Name] [[-Test] ] [-ForEach ] [-Tag ] [-AllowNullOrEmptyForEach] - [] +It [-Name] [[-Test] ] [-ForEach ] [-Tag ] + [-AllowNullOrEmptyForEach] ``` ### Skip ```powershell -It [-Name] [[-Test] ] [-ForEach ] [-Tag ] [-Skip] - [-AllowNullOrEmptyForEach] [] +It [-Name] [[-Test] ] [-ForEach ] [-Tag ] [-Skip] + [-AllowNullOrEmptyForEach] ``` ## DESCRIPTION @@ -121,79 +121,75 @@ current hashtable are made available as variables inside It. ## PARAMETERS -### -Name - -An expressive phrase describing the expected test outcome. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Test +### -AllowNullOrEmptyForEach -The script block that should throw an exception if the -expectation of the test is not met.If you are following the -AAA pattern (Arrange-Act-Assert), this typically holds the -Assert. +Allows empty or null values for -ForEach when Run.FailOnNullOrEmptyForEach is enabled. +This might be excepted in certain scenarios like using external data. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ForEach (Formerly called TestCases.) Optional array of hashtable (or any IDictionary) objects. If this parameter is used, Pester will call the test script block once for each table in -the ForEach array, splatting the dictionary to the test script block as input. -If you want +the ForEach array, splatting the dictionary to the test script block as input. + If you want the name of the test to appear differently for each test case, you can embed tokens into the Name parameter with the syntax 'Adds numbers <A> and <B>' (assuming you have keys named A and B in your ForEach hashtables.) ```yaml -Type: Object[] -Parameter Sets: (All) -Aliases: TestCases - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object[] +DefaultValue: '' +SupportsWildcards: false +Aliases: +- TestCases +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Tag +### -Name -Optional parameter containing an array of strings. -When calling Invoke-Pester, -it is possible to include or exclude tests containing the same Tag. +An expressive phrase describing the expected test outcome. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Skip @@ -203,37 +199,75 @@ This is preferable to temporarily commenting out a test, because the test remains listed in the output. ```yaml -Type: SwitchParameter -Parameter Sets: Skip -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Skip + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -AllowNullOrEmptyForEach +### -Tag -Allows empty or null values for -ForEach when Run.FailOnNullOrEmptyForEach is enabled. -This might be excepted in certain scenarios like using external data. +Optional parameter containing an array of strings. +When calling Invoke-Pester, +it is possible to include or exclude tests containing the same Tag. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Test + +The script block that should throw an exception if the +expectation of the test is not met.If you are following the +AAA pattern (Arrange-Act-Assert), this typically holds the +Assert. -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +```yaml +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -243,14 +277,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/It](https://pester.dev/docs/commands/It) - -[https://pester.dev/docs/commands/Describe](https://pester.dev/docs/commands/Describe) - -[https://pester.dev/docs/commands/Context](https://pester.dev/docs/commands/Context) - -[https://pester.dev/docs/commands/Set-ItResult](https://pester.dev/docs/commands/Set-ItResult) +- [https://pester.dev/docs/commands/It](https://pester.dev/docs/commands/It) +- [https://pester.dev/docs/commands/Describe](https://pester.dev/docs/commands/Describe) +- [https://pester.dev/docs/commands/Context](https://pester.dev/docs/commands/Context) +- [https://pester.dev/docs/commands/Set-ItResult](https://pester.dev/docs/commands/Set-ItResult) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Mock.mdx b/docs/commands/Mock.mdx index d374d3a9..ea15e291 100644 --- a/docs/commands/Mock.mdx +++ b/docs/commands/Mock.mdx @@ -1,7 +1,7 @@ --- id: Mock title: Mock -description: Help page for the PowerShell Pester "Mock" command +description: Help for Pester command 'Mock'. Mocks the behavior of an existing command with an alternate implementation. keywords: - PowerShell - Pester @@ -24,9 +24,9 @@ implementation. ## SYNTAX ```powershell -Mock [[-CommandName] ] [[-MockWith] ] [-Verifiable] [[-ParameterFilter] ] - [[-ModuleName] ] [[-RemoveParameterType] ] [[-RemoveParameterValidation] ] - [] +Mock [[-CommandName] ] [[-MockWith] ] [[-ParameterFilter] ] + [[-ModuleName] ] [[-RemoveParameterType] ] + [[-RemoveParameterValidation] ] [-Verifiable] ``` ## DESCRIPTION @@ -190,15 +190,20 @@ mocked by using the -ModuleName parameter. The name of the command to be mocked. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -MockWith @@ -211,32 +216,45 @@ being mocked, and the MockWith script block can contain references to the mocked commands parameter variables. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: {} -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '{}' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Verifiable +### -ModuleName -When this is set, the mock will be checked when Should -InvokeVerifiable is -called. +Optional string specifying the name of the module where this command +is to be mocked. + This should be a module that _calls_ the mocked +command; it doesn't necessarily have to be the same module which +originally implemented the command. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ParameterFilter @@ -249,35 +267,20 @@ This ScriptBlock must return a boolean value. See examples for usage. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ModuleName - -Optional string specifying the name of the module where this command -is to be mocked. -This should be a module that _calls_ the mocked -command; it doesn't necessarily have to be the same module which -originally implemented the command. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -RemoveParameterType @@ -289,15 +292,20 @@ type requirements and allows some strongly typed functions to be mocked more easily. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 5 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -RemoveParameterValidation @@ -309,20 +317,50 @@ validation requirements, and allows functions that are strict about their parameter validation to be mocked more easily. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 6 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 5 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Verifiable + +When this is set, the mock will be checked when Should -InvokeVerifiable is +called. + +```yaml +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -332,10 +370,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/Mock](https://pester.dev/docs/commands/Mock) - -[https://pester.dev/docs/usage/mocking](https://pester.dev/docs/usage/mocking) +- [https://pester.dev/docs/commands/Mock](https://pester.dev/docs/commands/Mock) +- [https://pester.dev/docs/usage/mocking](https://pester.dev/docs/usage/mocking) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/New-Fixture.mdx b/docs/commands/New-Fixture.mdx index 02de35bb..af702794 100644 --- a/docs/commands/New-Fixture.mdx +++ b/docs/commands/New-Fixture.mdx @@ -1,7 +1,7 @@ --- id: New-Fixture title: New-Fixture -description: Help page for the PowerShell Pester "New-Fixture" command +description: Help for Pester command 'New-Fixture'. This function generates two scripts, one that defines a function and another one that contains its tests. keywords: - PowerShell - Pester @@ -24,7 +24,7 @@ and another one that contains its tests. ## SYNTAX ```powershell -New-Fixture [-Name] [[-Path] ] [] +New-Fixture [-Name] [[-Path] ] ``` ## DESCRIPTION @@ -90,15 +90,20 @@ Creates a new folder named Cleaner in the current directory and creates the scri Defines the name of the function and the name of the test to be created. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Path @@ -107,20 +112,28 @@ Defines path where the test and the function should be created, you can use full If the parameter is not specified the scripts are created in the current directory. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: $PWD -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: $PWD +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -132,16 +145,12 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/New-Fixture](https://pester.dev/docs/commands/New-Fixture) - -[https://pester.dev/docs/commands/Describe](https://pester.dev/docs/commands/Describe) - -[https://pester.dev/docs/commands/Context](https://pester.dev/docs/commands/Context) - -[https://pester.dev/docs/commands/It](https://pester.dev/docs/commands/It) - -[https://pester.dev/docs/commands/Should](https://pester.dev/docs/commands/Should) +- [https://pester.dev/docs/commands/New-Fixture](https://pester.dev/docs/commands/New-Fixture) +- [https://pester.dev/docs/commands/Describe](https://pester.dev/docs/commands/Describe) +- [https://pester.dev/docs/commands/Context](https://pester.dev/docs/commands/Context) +- [https://pester.dev/docs/commands/It](https://pester.dev/docs/commands/It) +- [https://pester.dev/docs/commands/Should](https://pester.dev/docs/commands/Should) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/New-MockObject.mdx b/docs/commands/New-MockObject.mdx index 49fafb69..30aa709d 100644 --- a/docs/commands/New-MockObject.mdx +++ b/docs/commands/New-MockObject.mdx @@ -1,7 +1,7 @@ --- id: New-MockObject title: New-MockObject -description: Help page for the PowerShell Pester "New-MockObject" command +description: Help for Pester command 'New-MockObject'. This function instantiates a .NET object from a type. keywords: - PowerShell - Pester @@ -25,15 +25,15 @@ This function instantiates a .NET object from a type. ### Type (Default) ```powershell -New-MockObject [-Type] [-Properties ] [-Methods ] [-MethodHistoryPrefix ] - [] +New-MockObject [-Type] [-Properties ] [-Methods ] + [-MethodHistoryPrefix ] ``` ### InputObject ```powershell -New-MockObject -InputObject [-Properties ] [-Methods ] - [-MethodHistoryPrefix ] [] +New-MockObject -InputObject [-Properties ] [-Methods ] + [-MethodHistoryPrefix ] ``` ## DESCRIPTION @@ -101,61 +101,53 @@ to mock output using an internal module class. ## PARAMETERS -### -Type - -The .NET type to create. -This creates the object without calling any of its constructors or initializers. -Use this to instantiate an object that does not have a public constructor. -If your object has a constructor, or is giving you errors, try using the constructor and provide the object using the InputObject parameter to decorate it. - -```yaml -Type: Type -Parameter Sets: Type -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -InputObject An already constructed object to decorate. Use `New-Object` or `[typeName]::new()` to create it. ```yaml -Type: Object -Parameter Sets: InputObject -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: InputObject + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Properties +### -MethodHistoryPrefix -Properties to define, specified as a hashtable, in format `@\{ PropertyName = value \}`. +Prefix for the history-property created for each mocked method. +Default is '_' which would create the property '_MethodName'. ```yaml -Type: Hashtable -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: _ +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Methods -Methods to define, specified as a hashtable, in format `@\{ MethodName = scriptBlock \}`. +Methods to define, specified as a hashtable, in format `@{ MethodName = scriptBlock }`. ScriptBlock can define param block, and it will receive arguments that were provided to the function call based on order. @@ -164,37 +156,85 @@ Method overloads are not supported because ScriptMethods are used to decorate th For each method a property named `_MethodName` (if using default `-MethodHistoryPrefix`) is defined which holds history of the invocations of the method and the arguments that were provided. ```yaml -Type: Hashtable -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Collections.Hashtable +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: InputObject + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Type + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -MethodHistoryPrefix +### -Properties -Prefix for the history-property created for each mocked method. -Default is '_' which would create the property '_MethodName'. +Properties to define, specified as a hashtable, in format `@{ PropertyName = value }`. + +```yaml +Type: System.Collections.Hashtable +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: InputObject + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Type + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Type + +The .NET type to create. +This creates the object without calling any of its constructors or initializers. +Use this to instantiate an object that does not have a public constructor. +If your object has a constructor, or is giving you errors, try using the constructor and provide the object using the InputObject parameter to decorate it. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: _ -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Type +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Type + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -204,10 +244,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/New-MockObject](https://pester.dev/docs/commands/New-MockObject) - -[https://pester.dev/docs/usage/mocking](https://pester.dev/docs/usage/mocking) +- [https://pester.dev/docs/commands/New-MockObject](https://pester.dev/docs/commands/New-MockObject) +- [https://pester.dev/docs/usage/mocking](https://pester.dev/docs/usage/mocking) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/New-PesterConfiguration.mdx b/docs/commands/New-PesterConfiguration.mdx index dae3d2c5..6cf8562e 100644 --- a/docs/commands/New-PesterConfiguration.mdx +++ b/docs/commands/New-PesterConfiguration.mdx @@ -1,7 +1,7 @@ --- id: New-PesterConfiguration title: New-PesterConfiguration -description: Help page for the PowerShell Pester "New-PesterConfiguration" command +description: Help for Pester command 'New-PesterConfiguration'. Creates a new PesterConfiguration object for advanced configuration of Invoke-Pester. keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Creates a new PesterConfiguration object for advanced configuration of Invoke-Pe ## SYNTAX ```powershell -New-PesterConfiguration [[-Hashtable] ] [] +New-PesterConfiguration [[-Hashtable] ] ``` ## DESCRIPTION @@ -88,20 +88,28 @@ See about_PesterConfiguration help topic or inspect a PesterConfiguration-object available options. ```yaml -Type: IDictionary -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Collections.IDictionary +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -113,12 +121,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/New-PesterConfiguration](https://pester.dev/docs/commands/New-PesterConfiguration) - -[https://pester.dev/docs/usage/Configuration](https://pester.dev/docs/usage/Configuration) - -[https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) +- [https://pester.dev/docs/commands/New-PesterConfiguration](https://pester.dev/docs/commands/New-PesterConfiguration) +- [https://pester.dev/docs/usage/Configuration](https://pester.dev/docs/usage/Configuration) +- [https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/New-PesterContainer.mdx b/docs/commands/New-PesterContainer.mdx index e73b380f..67a4c93c 100644 --- a/docs/commands/New-PesterContainer.mdx +++ b/docs/commands/New-PesterContainer.mdx @@ -1,7 +1,7 @@ --- id: New-PesterContainer title: New-PesterContainer -description: Help page for the PowerShell Pester "New-PesterContainer" command +description: Help for Pester command 'New-PesterContainer'. Generates ContainerInfo-objects used as for Invoke-Pester -Container keywords: - PowerShell - Pester @@ -25,13 +25,13 @@ Generates ContainerInfo-objects used as for Invoke-Pester -Container ### Path (Default) ```powershell -New-PesterContainer -Path [-Data ] [] +New-PesterContainer -Path [-Data ] ``` ### ScriptBlock ```powershell -New-PesterContainer -ScriptBlock [-Data ] [] +New-PesterContainer -ScriptBlock [-Data ] ``` ## DESCRIPTION @@ -80,6 +80,28 @@ the required ContainerInfo-object that enables us to do this directly. ## PARAMETERS +### -Data + +Allows a dictionary to be provided with parameter-values that should be used during +execution of the test containers defined in Path or ScriptBlock. + +```yaml +Type: System.Collections.IDictionary[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + ### -Path Specifies one or more paths to files containing tests. @@ -88,15 +110,20 @@ name or name pattern. Wildcards are permitted. ```yaml -Type: String[] -Parameter Sets: Path -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Path + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ScriptBlock @@ -104,37 +131,28 @@ Accept wildcard characters: False Specifies one or more scriptblocks containing tests. ```yaml -Type: ScriptBlock[] -Parameter Sets: ScriptBlock -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Data - -Allows a dictionary to be provided with parameter-values that should be used during -execution of the test containers defined in Path or ScriptBlock. - -```yaml -Type: IDictionary[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: ScriptBlock + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -146,12 +164,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/New-PesterContainer](https://pester.dev/docs/commands/New-PesterContainer) - -[https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) - -[https://pester.dev/docs/usage/data-driven-tests](https://pester.dev/docs/usage/data-driven-tests) +- [https://pester.dev/docs/commands/New-PesterContainer](https://pester.dev/docs/commands/New-PesterContainer) +- [https://pester.dev/docs/commands/Invoke-Pester](https://pester.dev/docs/commands/Invoke-Pester) +- [https://pester.dev/docs/usage/data-driven-tests](https://pester.dev/docs/usage/data-driven-tests) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Set-ItResult.mdx b/docs/commands/Set-ItResult.mdx index eaedd122..f5cdeed6 100644 --- a/docs/commands/Set-ItResult.mdx +++ b/docs/commands/Set-ItResult.mdx @@ -1,7 +1,7 @@ --- id: Set-ItResult title: Set-ItResult -description: Help page for the PowerShell Pester "Set-ItResult" command +description: Help for Pester command 'Set-ItResult'. Set-ItResult is used inside the It block to explicitly set the test result keywords: - PowerShell - Pester @@ -25,13 +25,13 @@ Set-ItResult is used inside the It block to explicitly set the test result ### Inconclusive ```powershell -Set-ItResult [-Inconclusive] [-Because ] [] +Set-ItResult [-Inconclusive] [-Because ] ``` ### Skipped ```powershell -Set-ItResult [-Skipped] [-Because ] [] +Set-ItResult [-Skipped] [-Because ] ``` ## DESCRIPTION @@ -68,21 +68,49 @@ Tests Passed: 0, Failed: 0, Skipped: 1, Inconclusive: 1, NotRun: 0 ## PARAMETERS +### -Because + +Similarly to failing tests, skipped and inconclusive tests should have reason. +It allows +to provide information to the user why the test is neither successful nor failed. + +```yaml +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + ### -Inconclusive Sets the test result to inconclusive. Cannot be used at the same time as -Skipped ```yaml -Type: SwitchParameter -Parameter Sets: Inconclusive -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Inconclusive + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Skipped @@ -91,38 +119,28 @@ Sets the test result to skipped. Cannot be used at the same time as -Inconclusive. ```yaml -Type: SwitchParameter -Parameter Sets: Skipped -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Because - -Similarly to failing tests, skipped and inconclusive tests should have reason. -It allows -to provide information to the user why the test is neither successful nor failed. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Skipped + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -132,8 +150,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/commands/Set-ItResult](https://pester.dev/docs/commands/Set-ItResult) +- [https://pester.dev/docs/commands/Set-ItResult](https://pester.dev/docs/commands/Set-ItResult) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-All.mdx b/docs/commands/Should-All.mdx index c9c8126a..b349f582 100644 --- a/docs/commands/Should-All.mdx +++ b/docs/commands/Should-All.mdx @@ -1,7 +1,7 @@ --- id: Should-All title: Should-All -description: Help page for the PowerShell Pester "Should-All" command +description: Help for Pester command 'Should-All'. Compares all items in a collection to a filter script. If the filter returns true, or does not throw for all the items in the collection, the assertion passes. keywords: - PowerShell - Pester @@ -18,13 +18,12 @@ Contributions are welcome in [Pester-repo](https://github.com/pester/pester). ## SYNOPSIS -Compares all items in a collection to a filter script. -If the filter returns true, or does not throw for all the items in the collection, the assertion passes. +Compares all items in a collection to a filter script. If the filter returns true, or does not throw for all the items in the collection, the assertion passes. ## SYNTAX ```powershell -Should-All [[-Actual] ] [-FilterScript] [-Because ] [] +Should-All [-FilterScript] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -59,56 +58,76 @@ The assertions will fail because not all items in the array are greater than 1. A collection of items to filter. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -FilterScript +### -Because -A script block that filters the input collection. -The script block can use Should-* assertions or throw exceptions to indicate failure. +The reason why the input should be the expected value. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -FilterScript -The reason why the input should be the expected value. +A script block that filters the input collection. +The script block can use Should-* assertions or throw exceptions to indicate failure. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -121,10 +140,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-All](https://pester.dev/docs/commands/Should-All) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-All](https://pester.dev/docs/commands/Should-All) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-Any.mdx b/docs/commands/Should-Any.mdx index 6dd665d2..876323c5 100644 --- a/docs/commands/Should-Any.mdx +++ b/docs/commands/Should-Any.mdx @@ -1,7 +1,7 @@ --- id: Should-Any title: Should-Any -description: Help page for the PowerShell Pester "Should-Any" command +description: Help for Pester command 'Should-Any'. Compares all items in a collection to a filter script. If the filter returns true, or does not throw for any of the items in the collection, the assertion passes. keywords: - PowerShell - Pester @@ -18,13 +18,12 @@ Contributions are welcome in [Pester-repo](https://github.com/pester/pester). ## SYNOPSIS -Compares all items in a collection to a filter script. -If the filter returns true, or does not throw for any of the items in the collection, the assertion passes. +Compares all items in a collection to a filter script. If the filter returns true, or does not throw for any of the items in the collection, the assertion passes. ## SYNTAX ```powershell -Should-Any [[-Actual] ] [-FilterScript] [-Because ] [] +Should-Any [-FilterScript] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -60,56 +59,76 @@ The assertions will fail because none of theitems in the array are greater than A collection of items to filter. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -FilterScript +### -Because -A script block that filters the input collection. -The script block can use Should-* assertions or throw exceptions to indicate failure. +The reason why the input should be the expected value. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -FilterScript -The reason why the input should be the expected value. +A script block that filters the input collection. +The script block can use Should-* assertions or throw exceptions to indicate failure. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -122,10 +141,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-Any](https://pester.dev/docs/commands/Should-Any) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-Any](https://pester.dev/docs/commands/Should-Any) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-Be.mdx b/docs/commands/Should-Be.mdx index b7ffb3ac..a8cbdf17 100644 --- a/docs/commands/Should-Be.mdx +++ b/docs/commands/Should-Be.mdx @@ -1,7 +1,7 @@ --- id: Should-Be title: Should-Be -description: Help page for the PowerShell Pester "Should-Be" command +description: Help for Pester command 'Should-Be'. Compares the expected value to actual value, to see if they are equal. keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Compares the expected value to actual value, to see if they are equal. ## SYNTAX ```powershell -Should-Be [[-Actual] ] [-Expected] [-Because ] [] +Should-Be [-Expected] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -49,55 +49,75 @@ These assertions will pass, because the expected value is equal to the actual va The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected value. +The reason why the input should be the expected value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the input should be the expected value. +The expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -110,10 +130,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-Be](https://pester.dev/docs/commands/Should-Be) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-Be](https://pester.dev/docs/commands/Should-Be) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeAfter.mdx b/docs/commands/Should-BeAfter.mdx index 97856468..271ae26d 100644 --- a/docs/commands/Should-BeAfter.mdx +++ b/docs/commands/Should-BeAfter.mdx @@ -1,7 +1,7 @@ --- id: Should-BeAfter title: Should-BeAfter -description: Help page for the PowerShell Pester "Should-BeAfter" command +description: Help for Pester command 'Should-BeAfter'. Asserts that the provided [datetime] is after the expected [datetime]. keywords: - PowerShell - Pester @@ -25,25 +25,25 @@ Asserts that the provided [datetime] is after the expected [datetime]. ### Now (Default) ```powershell -Should-BeAfter [[-Actual] ] [-Now] [-Because ] [] +Should-BeAfter [[-Actual] ] [-Now] [-Because ] ``` ### FluentFromNow ```powershell -Should-BeAfter [[-Actual] ] [[-Time] ] [-FromNow] [-Because ] [] +Should-BeAfter [[-Time] ] [[-Actual] ] -FromNow [-Because ] ``` ### FluentAgo ```powershell -Should-BeAfter [[-Actual] ] [[-Time] ] [-Ago] [-Because ] [] +Should-BeAfter [[-Time] ] [[-Actual] ] -Ago [-Because ] ``` ### Expected ```powershell -Should-BeAfter [[-Actual] ] [[-Expected] ] [-Because ] [] +Should-BeAfter [[-Expected] ] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -92,65 +92,83 @@ This assertion will pass, because the actual value is after the expected value. The actual [datetime] value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Now +### -Ago -Indicates that the current time should be used as the expected time. +Indicates that the -Time should be subtracted from the current time. ```yaml -Type: SwitchParameter -Parameter Sets: Now -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FluentAgo + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Time +### -Because -The time to add or subtract from the current time. -This parameter uses fluent time syntax e.g. -1minute. +The reason why the actual value should be after the expected value. ```yaml -Type: String -Parameter Sets: FluentFromNow, FluentAgo -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Ago +### -Expected -Indicates that the -Time should be subtracted from the current time. +The expected [datetime] value. ```yaml -Type: SwitchParameter -Parameter Sets: FluentAgo -Aliases: - -Required: True -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.DateTime +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Expected + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -FromNow @@ -158,55 +176,83 @@ Accept wildcard characters: False Indicates that the -Time should be added to the current time. ```yaml -Type: SwitchParameter -Parameter Sets: FluentFromNow -Aliases: - -Required: True -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FluentFromNow + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Now -The expected [datetime] value. +Indicates that the current time should be used as the expected time. ```yaml -Type: DateTime -Parameter Sets: Expected -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Now + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Time -The reason why the actual value should be after the expected value. +The time to add or subtract from the current time. +This parameter uses fluent time syntax e.g. +1minute. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FluentFromNow + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FluentAgo + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -221,10 +267,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeAfter](https://pester.dev/docs/commands/Should-BeAfter) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeAfter](https://pester.dev/docs/commands/Should-BeAfter) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeBefore.mdx b/docs/commands/Should-BeBefore.mdx index ad383d62..b09849ca 100644 --- a/docs/commands/Should-BeBefore.mdx +++ b/docs/commands/Should-BeBefore.mdx @@ -1,7 +1,7 @@ --- id: Should-BeBefore title: Should-BeBefore -description: Help page for the PowerShell Pester "Should-BeBefore" command +description: Help for Pester command 'Should-BeBefore'. Asserts that the provided [datetime] is before the expected [datetime]. keywords: - PowerShell - Pester @@ -25,25 +25,25 @@ Asserts that the provided [datetime] is before the expected [datetime]. ### Now (Default) ```powershell -Should-BeBefore [[-Actual] ] [-Now] [-Because ] [] +Should-BeBefore [[-Actual] ] [-Now] [-Because ] ``` ### FluentFromNow ```powershell -Should-BeBefore [[-Actual] ] [[-Time] ] [-FromNow] [-Because ] [] +Should-BeBefore [[-Time] ] [[-Actual] ] -FromNow [-Because ] ``` ### FluentAgo ```powershell -Should-BeBefore [[-Actual] ] [[-Time] ] [-Ago] [-Because ] [] +Should-BeBefore [[-Time] ] [[-Actual] ] -Ago [-Because ] ``` ### Expected ```powershell -Should-BeBefore [[-Actual] ] [[-Expected] ] [-Because ] [] +Should-BeBefore [[-Expected] ] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -92,65 +92,83 @@ This assertion will pass, because the actual value is before the expected value. The actual [datetime] value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Now +### -Ago -Indicates that the current time should be used as the expected time. +Indicates that the -Time should be subtracted from the current time. ```yaml -Type: SwitchParameter -Parameter Sets: Now -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FluentAgo + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Time +### -Because -The time to add or subtract from the current time. -This parameter uses fluent time syntax e.g. -1minute. +The reason why the actual value should be before the expected value. ```yaml -Type: String -Parameter Sets: FluentFromNow, FluentAgo -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Ago +### -Expected -Indicates that the -Time should be subtracted from the current time. +The expected [datetime] value. ```yaml -Type: SwitchParameter -Parameter Sets: FluentAgo -Aliases: - -Required: True -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.DateTime +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Expected + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -FromNow @@ -158,55 +176,83 @@ Accept wildcard characters: False Indicates that the -Time should be added to the current time. ```yaml -Type: SwitchParameter -Parameter Sets: FluentFromNow -Aliases: - -Required: True -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FluentFromNow + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Now -The expected [datetime] value. +Indicates that the current time should be used as the expected time. ```yaml -Type: DateTime -Parameter Sets: Expected -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Now + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Time -The reason why the actual value should be before the expected value. +The time to add or subtract from the current time. +This parameter uses fluent time syntax e.g. +1minute. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FluentFromNow + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FluentAgo + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -221,10 +267,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeBefore](https://pester.dev/docs/commands/Should-BeBefore) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeBefore](https://pester.dev/docs/commands/Should-BeBefore) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeCollection.mdx b/docs/commands/Should-BeCollection.mdx index d5b3eac9..185d5dd0 100644 --- a/docs/commands/Should-BeCollection.mdx +++ b/docs/commands/Should-BeCollection.mdx @@ -1,7 +1,7 @@ --- id: Should-BeCollection title: Should-BeCollection -description: Help page for the PowerShell Pester "Should-BeCollection" command +description: Help for Pester command 'Should-BeCollection'. Compares collections for equality, by comparing their sizes and each item in them. It does not compare the types of the input collections. keywords: - PowerShell - Pester @@ -18,21 +18,20 @@ Contributions are welcome in [Pester-repo](https://github.com/pester/pester). ## SYNOPSIS -Compares collections for equality, by comparing their sizes and each item in them. -It does not compare the types of the input collections. +Compares collections for equality, by comparing their sizes and each item in them. It does not compare the types of the input collections. ## SYNTAX ### Expected ```powershell -Should-BeCollection [[-Actual] ] [-Expected] [-Because ] [] +Should-BeCollection [-Expected] [[-Actual] ] [-Because ] ``` ### Count ```powershell -Should-BeCollection [[-Actual] ] [-Because ] [-Count ] [] +Should-BeCollection [[-Actual] ] [-Because ] [-Count ] ``` ## DESCRIPTION @@ -70,71 +69,96 @@ The assertions will fail because the collections are not equal. A collection of items. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -A collection of items. +The reason why the input should be the expected value. ```yaml -Type: Object -Parameter Sets: Expected -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Count -The reason why the input should be the expected value. +Checks if the collection has the expected number of items. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Int32 +DefaultValue: 0 +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Count + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Count +### -Expected -Checks if the collection has the expected number of items. +A collection of items. ```yaml -Type: Int32 -Parameter Sets: Count -Aliases: - -Required: False -Position: Named -Default value: 0 -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Expected + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -147,10 +171,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeCollection](https://pester.dev/docs/commands/Should-BeCollection) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeCollection](https://pester.dev/docs/commands/Should-BeCollection) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeEmptyString.mdx b/docs/commands/Should-BeEmptyString.mdx index 9a6512ae..1700d6f2 100644 --- a/docs/commands/Should-BeEmptyString.mdx +++ b/docs/commands/Should-BeEmptyString.mdx @@ -1,7 +1,7 @@ --- id: Should-BeEmptyString title: Should-BeEmptyString -description: Help page for the PowerShell Pester "Should-BeEmptyString" command +description: Help for Pester command 'Should-BeEmptyString'. Ensures that input is an empty string. keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Ensures that input is an empty string. ## SYNTAX ```powershell -Should-BeEmptyString [[-Actual] ] [-Because ] [] +Should-BeEmptyString [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -69,15 +69,20 @@ All the tests above will fail, the input is not a string. The actual value that will be compared to an empty string. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Because @@ -85,23 +90,33 @@ Accept wildcard characters: False The reason why the input should be an empty string. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -114,10 +129,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeEmptyString](https://pester.dev/docs/commands/Should-BeEmptyString) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeEmptyString](https://pester.dev/docs/commands/Should-BeEmptyString) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeEquivalent.mdx b/docs/commands/Should-BeEquivalent.mdx index 0221f46d..ebfcf5f8 100644 --- a/docs/commands/Should-BeEquivalent.mdx +++ b/docs/commands/Should-BeEquivalent.mdx @@ -1,7 +1,7 @@ --- id: Should-BeEquivalent title: Should-BeEquivalent -description: Help page for the PowerShell Pester "Should-BeEquivalent" command +description: Help for Pester command 'Should-BeEquivalent'. Compares two objects for equivalency, by recursively comparing their properties for equivalency. keywords: - PowerShell - Pester @@ -23,8 +23,8 @@ Compares two objects for equivalency, by recursively comparing their properties ## SYNTAX ```powershell -Should-BeEquivalent [[-Actual] ] [-Expected] [-Because ] [-ExcludePath ] - [-ExcludePathsNotOnExpected] [-Comparator ] [] +Should-BeEquivalent [-Expected] [[-Actual] ] [-Because ] + [-ExcludePath ] [-ExcludePathsNotOnExpected] [-Comparator ] ``` ## DESCRIPTION @@ -90,47 +90,64 @@ This will pass because the actual object has the same properties as the expected The actual object to compare. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected object to compare. +The reason why the input should be the expected value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Comparator -The reason why the input should be the expected value. +Specifies the comparison strategy to use. +The options are 'Equivalency' for a deep comparison that considers the structure and values of objects, and 'Equality' for a simple equality comparison. +The default is 'Equivalency'. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: Equivalency +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExcludePath @@ -140,15 +157,20 @@ Each path should correspond to a property name or a chain of property names sepa The paths use dot notation to navigate to a child property, such as "user.name". ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExcludePathsNotOnExpected @@ -157,41 +179,54 @@ A switch parameter that, when set, excludes any paths from the comparison that a This is useful for ignoring extra properties on the actual object that are not relevant to the comparison. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Comparator +### -Expected -Specifies the comparison strategy to use. -The options are 'Equivalency' for a deep comparison that considers the structure and values of objects, and 'Equality' for a simple equality comparison. -The default is 'Equivalency'. +The expected object to compare. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: Equivalency -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -204,10 +239,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeEquivalent](https://pester.dev/docs/commands/Should-BeEquivalent) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeEquivalent](https://pester.dev/docs/commands/Should-BeEquivalent) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeFalse.mdx b/docs/commands/Should-BeFalse.mdx index f5e7b7f9..1aa59de8 100644 --- a/docs/commands/Should-BeFalse.mdx +++ b/docs/commands/Should-BeFalse.mdx @@ -1,7 +1,7 @@ --- id: Should-BeFalse title: Should-BeFalse -description: Help page for the PowerShell Pester "Should-BeFalse" command +description: Help for Pester command 'Should-BeFalse'. Compares the actual value to a boolean $false. It does not convert input values to boolean, and will fail for any value that is not $false. keywords: - PowerShell - Pester @@ -18,13 +18,12 @@ Contributions are welcome in [Pester-repo](https://github.com/pester/pester). ## SYNOPSIS -Compares the actual value to a boolean $false. -It does not convert input values to boolean, and will fail for any value that is not $false. +Compares the actual value to a boolean $false. It does not convert input values to boolean, and will fail for any value that is not $false. ## SYNTAX ```powershell -Should-BeFalse [[-Actual] ] [[-Because] ] [] +Should-BeFalse [[-Actual] ] [[-Because] ] ``` ## DESCRIPTION @@ -62,15 +61,20 @@ All of these assertions will fail, because the actual value is not $false. The actual value to compare to $false. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Because @@ -78,23 +82,33 @@ Accept wildcard characters: False The reason why the input should be the expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -109,10 +123,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeFalse](https://pester.dev/docs/commands/Should-BeFalse) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeFalse](https://pester.dev/docs/commands/Should-BeFalse) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeFalsy.mdx b/docs/commands/Should-BeFalsy.mdx index 3e6dae45..b75e5229 100644 --- a/docs/commands/Should-BeFalsy.mdx +++ b/docs/commands/Should-BeFalsy.mdx @@ -1,7 +1,7 @@ --- id: Should-BeFalsy title: Should-BeFalsy -description: Help page for the PowerShell Pester "Should-BeFalsy" command +description: "Help for Pester command 'Should-BeFalsy'. Compares the actual value to a boolean $false or a falsy value: 0, \"\", $null or @(). It converts the input value to a boolean." keywords: - PowerShell - Pester @@ -18,13 +18,12 @@ Contributions are welcome in [Pester-repo](https://github.com/pester/pester). ## SYNOPSIS -Compares the actual value to a boolean $false or a falsy value: 0, "", $null or @(). -It converts the input value to a boolean. +Compares the actual value to a boolean $false or a falsy value: 0, "", $null or @(). It converts the input value to a boolean. ## SYNTAX ```powershell -Should-BeFalsy [[-Actual] ] [[-Because] ] [] +Should-BeFalsy [[-Actual] ] [[-Because] ] ``` ## DESCRIPTION @@ -62,15 +61,20 @@ These assertions will fail, because the actual value is not $false or falsy. The actual value to compare to $false. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Because @@ -78,23 +82,33 @@ Accept wildcard characters: False The reason why the input should be the expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -109,10 +123,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeFalsy](https://pester.dev/docs/commands/Should-BeFalsy) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeFalsy](https://pester.dev/docs/commands/Should-BeFalsy) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeFasterThan.mdx b/docs/commands/Should-BeFasterThan.mdx index e2c4bc98..d88fb34a 100644 --- a/docs/commands/Should-BeFasterThan.mdx +++ b/docs/commands/Should-BeFasterThan.mdx @@ -1,7 +1,7 @@ --- id: Should-BeFasterThan title: Should-BeFasterThan -description: Help page for the PowerShell Pester "Should-BeFasterThan" command +description: Help for Pester command 'Should-BeFasterThan'. Asserts that the provided [timespan] or [scriptblock] is faster than the expected [timespan]. keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Asserts that the provided [timespan] or [scriptblock] is faster than the expecte ## SYNTAX ```powershell -Should-BeFasterThan [[-Actual] ] [[-Expected] ] [-Because ] [] +Should-BeFasterThan [[-Expected] ] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -56,55 +56,75 @@ This assertion will fail, because the actual value is not faster than the expect The actual [timespan] or [scriptblock] value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected [timespan] or fluent time value. +The reason why the actual value should be faster than the expected value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the actual value should be faster than the expected value. +The expected [timespan] or fluent time value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -119,10 +139,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeFasterThan](https://pester.dev/docs/commands/Should-BeFasterThan) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeFasterThan](https://pester.dev/docs/commands/Should-BeFasterThan) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeGreaterThan.mdx b/docs/commands/Should-BeGreaterThan.mdx index bdddb0a9..933f91c8 100644 --- a/docs/commands/Should-BeGreaterThan.mdx +++ b/docs/commands/Should-BeGreaterThan.mdx @@ -1,7 +1,7 @@ --- id: Should-BeGreaterThan title: Should-BeGreaterThan -description: Help page for the PowerShell Pester "Should-BeGreaterThan" command +description: Help for Pester command 'Should-BeGreaterThan'. Compares the expected value to actual value, to see if the actual value is greater than the expected value. keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Compares the expected value to actual value, to see if the actual value is great ## SYNTAX ```powershell -Should-BeGreaterThan [[-Actual] ] [-Expected] [-Because ] [] +Should-BeGreaterThan [-Expected] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -48,55 +48,75 @@ These assertions will pass, because the actual value is greater than the expecte The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected value. +The reason why the input should be the expected value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the input should be the expected value. +The expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -109,10 +129,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeGreaterThan](https://pester.dev/docs/commands/Should-BeGreaterThan) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeGreaterThan](https://pester.dev/docs/commands/Should-BeGreaterThan) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeGreaterThanOrEqual.mdx b/docs/commands/Should-BeGreaterThanOrEqual.mdx index f696c922..3267f92e 100644 --- a/docs/commands/Should-BeGreaterThanOrEqual.mdx +++ b/docs/commands/Should-BeGreaterThanOrEqual.mdx @@ -1,7 +1,7 @@ --- id: Should-BeGreaterThanOrEqual title: Should-BeGreaterThanOrEqual -description: Help page for the PowerShell Pester "Should-BeGreaterThanOrEqual" command +description: Help for Pester command 'Should-BeGreaterThanOrEqual'. Compares the expected value to actual value, to see if the actual value is greater than or equal to the expected value. keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Compares the expected value to actual value, to see if the actual value is great ## SYNTAX ```powershell -Should-BeGreaterThanOrEqual [[-Actual] ] [-Expected] [-Because ] [] +Should-BeGreaterThanOrEqual [-Expected] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -48,55 +48,75 @@ These assertions will pass, because the actual value is greater than or equal to The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected value. +The reason why the input should be the expected value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the input should be the expected value. +The expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -109,10 +129,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeGreaterThanOrEqual](https://pester.dev/docs/commands/Should-BeGreaterThanOrEqual) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeGreaterThanOrEqual](https://pester.dev/docs/commands/Should-BeGreaterThanOrEqual) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeHashtable.mdx b/docs/commands/Should-BeHashtable.mdx index aad1b61c..91d9059b 100644 --- a/docs/commands/Should-BeHashtable.mdx +++ b/docs/commands/Should-BeHashtable.mdx @@ -1,7 +1,7 @@ --- id: Should-BeHashtable title: Should-BeHashtable -description: Help page for the PowerShell Pester "Should-BeHashtable" command +description: Help for Pester command 'Should-BeHashtable'. Asserts that the input is a hashtable or dictionary, and optionally checks the number of entries, whether it is ordered, and that it contains specific keys. keywords: - PowerShell - Pester @@ -24,23 +24,23 @@ entries, whether it is ordered, and that it contains specific keys. ## SYNTAX ```powershell -Should-BeHashtable [[-Actual] ] [-Count ] [-Key ] [-Ordered] [-Because ] - [] +Should-BeHashtable [[-Actual] ] [-Count ] [-Key ] [-Ordered] + [-Because ] ``` ## DESCRIPTION `Should-BeHashtable` is a shape assertion. It verifies that `$Actual` is a hashtable or -dictionary (anything implementing `System.Collections.IDictionary`, such as `@\{\}`, -`[ordered]@\{\}` or a generic `Dictionary[,]`). +dictionary (anything implementing `System.Collections.IDictionary`, such as `@{}`, +`[ordered]@{}` or a generic `Dictionary[,]`). It does not compare the contents of the dictionary. Use the optional parameters to assert on the shape of the dictionary: - `-Count` checks the number of entries. -- `-Ordered` checks that the value is an ordered dictionary (`[ordered]@\{\}`). +- `-Ordered` checks that the value is an ordered dictionary (`[ordered]@{}`). - `-Key` checks that the given keys are present, ignoring their values. When combined with `-Ordered`, the keys must also appear in the given relative order. @@ -90,15 +90,41 @@ The value to test. It is expected to be a hashtable or dictionary. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Because + +The reason why the input should be a hashtable with the expected shape. + +```yaml +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Count @@ -106,15 +132,20 @@ Accept wildcard characters: False Checks that the dictionary has the expected number of entries. ```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: 0 -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Int32 +DefaultValue: 0 +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Key @@ -126,57 +157,56 @@ When `-Ordered` is also specified, the keys must appear in the dictionary in the same relative order as they are listed here. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Ordered Checks that the dictionary is an ordered dictionary (`System.Collections.Specialized.OrderedDictionary`), -as produced by `[ordered]@\{\}`. +as produced by `[ordered]@{}`. A plain `[hashtable]` is unordered and fails this check. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Because - -The reason why the input should be a hashtable with the expected shape. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -193,10 +223,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeHashtable](https://pester.dev/docs/commands/Should-BeHashtable) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeHashtable](https://pester.dev/docs/commands/Should-BeHashtable) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeLessThan.mdx b/docs/commands/Should-BeLessThan.mdx index 798945a3..32db5452 100644 --- a/docs/commands/Should-BeLessThan.mdx +++ b/docs/commands/Should-BeLessThan.mdx @@ -1,7 +1,7 @@ --- id: Should-BeLessThan title: Should-BeLessThan -description: Help page for the PowerShell Pester "Should-BeLessThan" command +description: Help for Pester command 'Should-BeLessThan'. Compares the expected value to actual value, to see if the actual value is less than the expected value. keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Compares the expected value to actual value, to see if the actual value is less ## SYNTAX ```powershell -Should-BeLessThan [[-Actual] ] [-Expected] [-Because ] [] +Should-BeLessThan [-Expected] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -48,55 +48,75 @@ These assertions will pass, because the actual value is less than the expected v The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected value. +The reason why the input should be the expected value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the input should be the expected value. +The expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -109,10 +129,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeLessThan](https://pester.dev/docs/commands/Should-BeLessThan) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeLessThan](https://pester.dev/docs/commands/Should-BeLessThan) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeLessThanOrEqual.mdx b/docs/commands/Should-BeLessThanOrEqual.mdx index 33414ae2..eac8902d 100644 --- a/docs/commands/Should-BeLessThanOrEqual.mdx +++ b/docs/commands/Should-BeLessThanOrEqual.mdx @@ -1,7 +1,7 @@ --- id: Should-BeLessThanOrEqual title: Should-BeLessThanOrEqual -description: Help page for the PowerShell Pester "Should-BeLessThanOrEqual" command +description: Help for Pester command 'Should-BeLessThanOrEqual'. Compares the expected value to actual value, to see if the actual value is less than or equal to the expected value. keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Compares the expected value to actual value, to see if the actual value is less ## SYNTAX ```powershell -Should-BeLessThanOrEqual [[-Actual] ] [-Expected] [-Because ] [] +Should-BeLessThanOrEqual [-Expected] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -56,55 +56,75 @@ This assertion will fail, because the actual value is not less than or equal to The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected value. +The reason why the input should be the expected value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the input should be the expected value. +The expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -119,10 +139,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeLessThanOrEqual](https://pester.dev/docs/commands/Should-BeLessThanOrEqual) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeLessThanOrEqual](https://pester.dev/docs/commands/Should-BeLessThanOrEqual) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeLikeString.mdx b/docs/commands/Should-BeLikeString.mdx index 2f1bb714..bb2f274e 100644 --- a/docs/commands/Should-BeLikeString.mdx +++ b/docs/commands/Should-BeLikeString.mdx @@ -1,7 +1,7 @@ --- id: Should-BeLikeString title: Should-BeLikeString -description: Help page for the PowerShell Pester "Should-BeLikeString" command +description: Help for Pester command 'Should-BeLikeString'. Asserts that the actual value is like the expected value. keywords: - PowerShell - Pester @@ -23,8 +23,7 @@ Asserts that the actual value is like the expected value. ## SYNTAX ```powershell -Should-BeLikeString [[-Actual] ] [-Expected] [-CaseSensitive] [-Because ] - [] +Should-BeLikeString [-Expected] [[-Actual] ] [-CaseSensitive] [-Because ] ``` ## DESCRIPTION @@ -57,31 +56,41 @@ This assertion will fail, because the actual value is not like the expected valu The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected value. +The reason why the actual value should be like the expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CaseSensitive @@ -89,39 +98,54 @@ Accept wildcard characters: False Indicates that the comparison should be case-sensitive. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the actual value should be like the expected value. +The expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -136,10 +160,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeLikeString](https://pester.dev/docs/commands/Should-BeLikeString) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeLikeString](https://pester.dev/docs/commands/Should-BeLikeString) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeNull.mdx b/docs/commands/Should-BeNull.mdx index 9f853ac3..558b16db 100644 --- a/docs/commands/Should-BeNull.mdx +++ b/docs/commands/Should-BeNull.mdx @@ -1,7 +1,7 @@ --- id: Should-BeNull title: Should-BeNull -description: Help page for the PowerShell Pester "Should-BeNull" command +description: Help for Pester command 'Should-BeNull'. Asserts that the input is `$null`. keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Asserts that the input is `$null`. ## SYNTAX ```powershell -Should-BeNull [[-Actual] ] [-Because ] [] +Should-BeNull [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -48,15 +48,20 @@ This assertion will pass, because the actual value is `$null`. The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Because @@ -64,23 +69,33 @@ Accept wildcard characters: False The reason why the input should be `$null`. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -93,10 +108,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeNull](https://pester.dev/docs/commands/Should-BeNull) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeNull](https://pester.dev/docs/commands/Should-BeNull) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeSame.mdx b/docs/commands/Should-BeSame.mdx index d341247d..c9d89cfb 100644 --- a/docs/commands/Should-BeSame.mdx +++ b/docs/commands/Should-BeSame.mdx @@ -1,7 +1,7 @@ --- id: Should-BeSame title: Should-BeSame -description: Help page for the PowerShell Pester "Should-BeSame" command +description: Help for Pester command 'Should-BeSame'. Compares the expected value to actual value, to see if they are the same instance. keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Compares the expected value to actual value, to see if they are the same instanc ## SYNTAX ```powershell -Should-BeSame [[-Actual] ] [-Expected] [-Because ] [] +Should-BeSame [-Expected] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -59,55 +59,75 @@ This assertion will fail, because the actual value is not the same instance as t The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected value. +The reason why the input should be the expected value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the input should be the expected value. +The expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -122,10 +142,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeSame](https://pester.dev/docs/commands/Should-BeSame) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeSame](https://pester.dev/docs/commands/Should-BeSame) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeSlowerThan.mdx b/docs/commands/Should-BeSlowerThan.mdx index d7809030..f7ff6686 100644 --- a/docs/commands/Should-BeSlowerThan.mdx +++ b/docs/commands/Should-BeSlowerThan.mdx @@ -1,7 +1,7 @@ --- id: Should-BeSlowerThan title: Should-BeSlowerThan -description: Help page for the PowerShell Pester "Should-BeSlowerThan" command +description: Help for Pester command 'Should-BeSlowerThan'. Asserts that the provided [timespan] is slower than the expected [timespan]. keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Asserts that the provided [timespan] is slower than the expected [timespan]. ## SYNTAX ```powershell -Should-BeSlowerThan [[-Actual] ] [[-Expected] ] [-Because ] [] +Should-BeSlowerThan [[-Expected] ] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -64,55 +64,75 @@ This assertion will fail, because the actual value is not slower than the expect The actual [timespan] or [scriptblock] value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected [timespan] or fluent time value. +The reason why the actual value should be slower than the expected value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the actual value should be slower than the expected value. +The expected [timespan] or fluent time value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -127,10 +147,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeSlowerThan](https://pester.dev/docs/commands/Should-BeSlowerThan) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeSlowerThan](https://pester.dev/docs/commands/Should-BeSlowerThan) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeString.mdx b/docs/commands/Should-BeString.mdx index c12baf49..6fd24ab1 100644 --- a/docs/commands/Should-BeString.mdx +++ b/docs/commands/Should-BeString.mdx @@ -1,7 +1,7 @@ --- id: Should-BeString title: Should-BeString -description: Help page for the PowerShell Pester "Should-BeString" command +description: Help for Pester command 'Should-BeString'. Asserts that the actual value is equal to the expected value. keywords: - PowerShell - Pester @@ -23,8 +23,8 @@ Asserts that the actual value is equal to the expected value. ## SYNTAX ```powershell -Should-BeString [[-Actual] ] [-Expected] [-Because ] [-CaseSensitive] - [-IgnoreWhitespace] [-TrimWhitespace] [] +Should-BeString [-Expected] [[-Actual] ] [-Because ] [-CaseSensitive] + [-IgnoreWhitespace] [-TrimWhitespace] ``` ## DESCRIPTION @@ -57,63 +57,83 @@ This assertion will fail, because the actual value is not equal to the expected The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected value. +The reason why the actual value should be equal to the expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -CaseSensitive -The reason why the actual value should be equal to the expected value. +Indicates that the comparison should be case-sensitive. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -CaseSensitive +### -Expected -Indicates that the comparison should be case-sensitive. +The expected value. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -IgnoreWhitespace @@ -121,15 +141,20 @@ Accept wildcard characters: False Indicates that the comparison should ignore whitespace. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -TrimWhitespace @@ -137,23 +162,33 @@ Accept wildcard characters: False Trims whitespace at the start and end of the string. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -168,10 +203,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeString](https://pester.dev/docs/commands/Should-BeString) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeString](https://pester.dev/docs/commands/Should-BeString) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeTrue.mdx b/docs/commands/Should-BeTrue.mdx index 3306d80c..08ea8465 100644 --- a/docs/commands/Should-BeTrue.mdx +++ b/docs/commands/Should-BeTrue.mdx @@ -1,7 +1,7 @@ --- id: Should-BeTrue title: Should-BeTrue -description: Help page for the PowerShell Pester "Should-BeTrue" command +description: Help for Pester command 'Should-BeTrue'. Compares the actual value to a boolean $true. It does not convert input values to boolean, and will fail for any value is not $true. keywords: - PowerShell - Pester @@ -18,13 +18,12 @@ Contributions are welcome in [Pester-repo](https://github.com/pester/pester). ## SYNOPSIS -Compares the actual value to a boolean $true. -It does not convert input values to boolean, and will fail for any value is not $true. +Compares the actual value to a boolean $true. It does not convert input values to boolean, and will fail for any value is not $true. ## SYNTAX ```powershell -Should-BeTrue [[-Actual] ] [[-Because] ] [] +Should-BeTrue [[-Actual] ] [[-Because] ] ``` ## DESCRIPTION @@ -62,15 +61,20 @@ All of these assertions will fail, because the actual value is not $true. The actual value to compare to $true. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Because @@ -78,23 +82,33 @@ Accept wildcard characters: False The reason why the input should be the expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -109,10 +123,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeTrue](https://pester.dev/docs/commands/Should-BeTrue) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeTrue](https://pester.dev/docs/commands/Should-BeTrue) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-BeTruthy.mdx b/docs/commands/Should-BeTruthy.mdx index b959914d..42c00b85 100644 --- a/docs/commands/Should-BeTruthy.mdx +++ b/docs/commands/Should-BeTruthy.mdx @@ -1,7 +1,7 @@ --- id: Should-BeTruthy title: Should-BeTruthy -description: Help page for the PowerShell Pester "Should-BeTruthy" command +description: Help for Pester command 'Should-BeTruthy'. Compares the actual value to a boolean $true. It converts input values to boolean, and will fail for any value is not $true, or truthy. keywords: - PowerShell - Pester @@ -18,13 +18,12 @@ Contributions are welcome in [Pester-repo](https://github.com/pester/pester). ## SYNOPSIS -Compares the actual value to a boolean $true. -It converts input values to boolean, and will fail for any value is not $true, or truthy. +Compares the actual value to a boolean $true. It converts input values to boolean, and will fail for any value is not $true, or truthy. ## SYNTAX ```powershell -Should-BeTruthy [[-Actual] ] [[-Because] ] [] +Should-BeTruthy [[-Actual] ] [[-Because] ] ``` ## DESCRIPTION @@ -63,15 +62,20 @@ All of these assertions will fail, because the actual value is not $true or trut The actual value to compare to $true. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Because @@ -79,23 +83,33 @@ Accept wildcard characters: False The reason why the input should be the expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -110,10 +124,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-BeTruthy](https://pester.dev/docs/commands/Should-BeTruthy) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-BeTruthy](https://pester.dev/docs/commands/Should-BeTruthy) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-ContainCollection.mdx b/docs/commands/Should-ContainCollection.mdx index 899d7e4c..760fb904 100644 --- a/docs/commands/Should-ContainCollection.mdx +++ b/docs/commands/Should-ContainCollection.mdx @@ -1,7 +1,7 @@ --- id: Should-ContainCollection title: Should-ContainCollection -description: Help page for the PowerShell Pester "Should-ContainCollection" command +description: Help for Pester command 'Should-ContainCollection'. Checks that the expected collection is present in the actual collection as an ordered subsequence. It does not compare the types of the input collections. keywords: - PowerShell - Pester @@ -18,13 +18,12 @@ Contributions are welcome in [Pester-repo](https://github.com/pester/pester). ## SYNOPSIS -Checks that the expected collection is present in the actual collection as an ordered subsequence. -It does not compare the types of the input collections. +Checks that the expected collection is present in the actual collection as an ordered subsequence. It does not compare the types of the input collections. ## SYNTAX ```powershell -Should-ContainCollection [[-Actual] ] [-Expected] [-Because ] [] +Should-ContainCollection [-Expected] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -66,56 +65,76 @@ These assertions fail, because an expected item is missing (`@(3, 4)`), the item The collection to search in. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -One or more items to look for as an ordered subsequence. -A single value is treated as a one-item collection. +The reason why the input should be the expected value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the input should be the expected value. +One or more items to look for as an ordered subsequence. +A single value is treated as a one-item collection. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -128,10 +147,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-ContainCollection](https://pester.dev/docs/commands/Should-ContainCollection) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-ContainCollection](https://pester.dev/docs/commands/Should-ContainCollection) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-HaveParameter.mdx b/docs/commands/Should-HaveParameter.mdx index 3a3c582f..9ab5eb9b 100644 --- a/docs/commands/Should-HaveParameter.mdx +++ b/docs/commands/Should-HaveParameter.mdx @@ -1,7 +1,7 @@ --- id: Should-HaveParameter title: Should-HaveParameter -description: Help page for the PowerShell Pester "Should-HaveParameter" command +description: Help for Pester command 'Should-HaveParameter'. Asserts that a command has the expected parameter. keywords: - PowerShell - Pester @@ -23,9 +23,9 @@ Asserts that a command has the expected parameter. ## SYNTAX ```powershell -Should-HaveParameter [[-ParameterName] ] [[-Type] ] [[-DefaultValue] ] [-Mandatory] - [[-InParameterSet] ] [-HasArgumentCompleter] [[-Alias] ] [[-Actual] ] - [[-Because] ] [] +Should-HaveParameter [[-ParameterName] ] [[-Type] ] [[-DefaultValue] ] + [[-InParameterSet] ] [[-Alias] ] [[-Actual] ] [[-Because] ] + [-Mandatory] [-HasArgumentCompleter] ``` ## DESCRIPTION @@ -84,40 +84,69 @@ This assertion passes, because the `-Index` parameter (from the `Get-Cat` functi ## PARAMETERS -### -ParameterName +### -Actual -The name of the parameter to check. +The actual command to check. E.g. -Uri +Get-Command "Invoke-WebRequest" ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 5 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Type +### -Alias -The type of the parameter to check. -E.g. -[string] +The alias of the parameter to check. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Because + +The reason why the input should be the expected value. + +```yaml +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 6 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -DefaultValue @@ -127,31 +156,41 @@ E.g. "https://example.com" ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Mandatory +### -HasArgumentCompleter -Whether the parameter is mandatory or not. +Whether the parameter has an argument completer or not. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -InParameterSet @@ -159,89 +198,100 @@ Accept wildcard characters: False The parameter set that the parameter belongs to. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HasArgumentCompleter - -Whether the parameter has an argument completer or not. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Alias +### -Mandatory -The alias of the parameter to check. +Whether the parameter is mandatory or not. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 5 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Actual +### -ParameterName -The actual command to check. +The name of the parameter to check. E.g. -Get-Command "Invoke-WebRequest" +Uri ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 6 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Type -The reason why the input should be the expected value. +The type of the parameter to check. +E.g. +[string] ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 7 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -259,10 +309,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-HaveParameter](https://pester.dev/docs/commands/Should-HaveParameter) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-HaveParameter](https://pester.dev/docs/commands/Should-HaveParameter) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-HaveType.mdx b/docs/commands/Should-HaveType.mdx index 45b584e3..b93a043b 100644 --- a/docs/commands/Should-HaveType.mdx +++ b/docs/commands/Should-HaveType.mdx @@ -1,7 +1,7 @@ --- id: Should-HaveType title: Should-HaveType -description: Help page for the PowerShell Pester "Should-HaveType" command +description: Help for Pester command 'Should-HaveType'. Asserts that the input is of the expected type. keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Asserts that the input is of the expected type. ## SYNTAX ```powershell -Should-HaveType [[-Actual] ] [-Expected] [-Because ] [] +Should-HaveType [-Expected] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -49,55 +49,75 @@ These assertions will pass, because the actual value is of the expected type. The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected type. +The reason why the input should be the expected type. ```yaml -Type: Type -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the input should be the expected type. +The expected type. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Type +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -110,10 +130,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-HaveType](https://pester.dev/docs/commands/Should-HaveType) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-HaveType](https://pester.dev/docs/commands/Should-HaveType) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-Invoke.mdx b/docs/commands/Should-Invoke.mdx index 34328284..c2a7a15b 100644 --- a/docs/commands/Should-Invoke.mdx +++ b/docs/commands/Should-Invoke.mdx @@ -1,7 +1,7 @@ --- id: Should-Invoke title: Should-Invoke -description: Help page for the PowerShell Pester "Should-Invoke" command +description: Help for Pester command 'Should-Invoke'. Checks if a Mocked command has been called a certain number of times and throws an exception if it has not. keywords: - PowerShell - Pester @@ -26,28 +26,28 @@ and throws an exception if it has not. ### Default (Default) ```powershell -Should-Invoke [-CommandName] [[-Times] ] [-ParameterFilter ] - [-ExclusiveFilter ] [-ModuleName ] [-Scope ] [-Exactly] [-Because ] - [] +Should-Invoke [-CommandName] [[-Times] ] [-ParameterFilter ] + [-ExclusiveFilter ] [-ModuleName ] [-Scope ] [-Exactly] + [-Because ] ``` ### ExclusiveFilter ```powershell -Should-Invoke -ExclusiveFilter [] +Should-Invoke -ExclusiveFilter ``` ### Verifiable ```powershell -Should-Invoke [-Because ] [-Verifiable] [] +Should-Invoke [-Because ] [-Verifiable] ``` ## DESCRIPTION This command verifies that a mocked command has been called a certain number -of times. -If the call history of the mocked command does not match the parameters +of times. + If the call history of the mocked command does not match the parameters passed to Should-Invoke, Should-Invoke will throw an exception. ## EXAMPLES @@ -150,91 +150,112 @@ It is a shorthand for pairing a `Should-Invoke` and a `Should-NotInvoke`. ## PARAMETERS -### -CommandName +### -Because -The mocked command whose call history should be checked. +The reason why the mock should be called. ```yaml -Type: String -Parameter Sets: Default -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Verifiable + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Default + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Times +### -CommandName -The number of times that the mock must be called to avoid an exception -from throwing. +The mocked command whose call history should be checked. ```yaml -Type: Int32 -Parameter Sets: Default -Aliases: - -Required: False -Position: 2 -Default value: 1 -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Default + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ParameterFilter +### -Exactly -An optional filter to qualify which calls should be counted. -Only those -calls to the mock whose parameters cause this filter to return true -will be counted. +If this switch is present, the number specified in Times must match +exactly the number of times the mock has been called. +Otherwise it +must match "at least" the number of times specified. + If the value +passed to the Times parameter is zero, the Exactly switch is implied. ```yaml -Type: ScriptBlock -Parameter Sets: Default -Aliases: - -Required: False -Position: Named -Default value: { $True } -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Default + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExclusiveFilter Like ParameterFilter, except when you use ExclusiveFilter, and there were any calls to the mocked command which do not match the filter, -an exception will be thrown. -This is a convenient way to avoid needing +an exception will be thrown. + This is a convenient way to avoid needing to have two calls to Should-Invoke like this: Should-Invoke SomeCommand -Times 1 -ParameterFilter \{ $something -eq $true \} Should-Invoke SomeCommand -Times 0 -ParameterFilter \{ $something -ne $true \} ```yaml -Type: ScriptBlock -Parameter Sets: Default -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -```yaml -Type: ScriptBlock -Parameter Sets: ExclusiveFilter -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: ExclusiveFilter + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Default + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ModuleName @@ -244,15 +265,44 @@ This is optional, and must match the ModuleName that was used when setting up the Mock. ```yaml -Type: String -Parameter Sets: Default -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Default + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -ParameterFilter + +An optional filter to qualify which calls should be counted. +Only those +calls to the mock whose parameters cause this filter to return true +will be counted. + +```yaml +Type: System.Management.Automation.ScriptBlock +DefaultValue: '{ $True }' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Default + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Scope @@ -269,52 +319,42 @@ Context, the command will identify all calls to the mocked command in the current Describe / Context block, as well as all child scopes of that block. ```yaml -Type: String -Parameter Sets: Default -Aliases: - -Required: False -Position: Named -Default value: 0 -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Exactly - -If this switch is present, the number specified in Times must match -exactly the number of times the mock has been called. -Otherwise it -must match "at least" the number of times specified. -If the value -passed to the Times parameter is zero, the Exactly switch is implied. - -```yaml -Type: SwitchParameter -Parameter Sets: Default -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: 0 +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Default + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Times -The reason why the mock should be called. +The number of times that the mock must be called to avoid an exception +from throwing. ```yaml -Type: String -Parameter Sets: Default, Verifiable -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Int32 +DefaultValue: 1 +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Default + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Verifiable @@ -322,20 +362,28 @@ Accept wildcard characters: False Makes sure that all verifiable mocks were called. ```yaml -Type: SwitchParameter -Parameter Sets: Verifiable -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Verifiable + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -344,10 +392,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES The parameter filter passed to Should-Invoke does not necessarily have to match the parameter filter -(if any) which was used to create the Mock. -Should-Invoke will find any entry in the command history -which matches its parameter filter, regardless of how the Mock was created. -However, if any calls to the +(if any) which was used to create the Mock. + Should-Invoke will find any entry in the command history +which matches its parameter filter, regardless of how the Mock was created. + However, if any calls to the mocked command are made which did not match any mock's parameter filter (resulting in the original command being executed instead of a mock), these calls to the original command are not tracked in the call history. In other words, Should-Invoke can only be used to check for calls to the mocked implementation, not @@ -361,10 +409,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-Invoke](https://pester.dev/docs/commands/Should-Invoke) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-Invoke](https://pester.dev/docs/commands/Should-Invoke) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-MatchString.mdx b/docs/commands/Should-MatchString.mdx index b8ca0a0d..f9f7117b 100644 --- a/docs/commands/Should-MatchString.mdx +++ b/docs/commands/Should-MatchString.mdx @@ -1,7 +1,7 @@ --- id: Should-MatchString title: Should-MatchString -description: Help page for the PowerShell Pester "Should-MatchString" command +description: Help for Pester command 'Should-MatchString'. Tests whether a string matches a regular expression pattern. keywords: - PowerShell - Pester @@ -23,8 +23,7 @@ Tests whether a string matches a regular expression pattern. ## SYNTAX ```powershell -Should-MatchString [[-Actual] ] [-Expected] [-CaseSensitive] [-Because ] - [] +Should-MatchString [-Expected] [[-Actual] ] [-CaseSensitive] [-Because ] ``` ## DESCRIPTION @@ -66,31 +65,41 @@ This assertion fails, because with `-CaseSensitive` the lowercase `pester` in th The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected regular expression pattern. +The reason why the actual value should match the regular expression pattern. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CaseSensitive @@ -98,39 +107,54 @@ Accept wildcard characters: False Indicates that the comparison should be case-sensitive. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the actual value should match the regular expression pattern. +The expected regular expression pattern. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -143,10 +167,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-MatchString](https://pester.dev/docs/commands/Should-MatchString) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-MatchString](https://pester.dev/docs/commands/Should-MatchString) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-NotBe.mdx b/docs/commands/Should-NotBe.mdx index f4d627b7..09b44956 100644 --- a/docs/commands/Should-NotBe.mdx +++ b/docs/commands/Should-NotBe.mdx @@ -1,7 +1,7 @@ --- id: Should-NotBe title: Should-NotBe -description: Help page for the PowerShell Pester "Should-NotBe" command +description: Help for Pester command 'Should-NotBe'. Compares the expected value to actual value, to see if they are not equal. keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Compares the expected value to actual value, to see if they are not equal. ## SYNTAX ```powershell -Should-NotBe [[-Actual] ] [-Expected] [-Because ] [] +Should-NotBe [-Expected] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -49,55 +49,75 @@ These assertions will pass, because the actual value is not equal to the expecte The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected value. +The reason why the input should not be the expected value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the input should not be the expected value. +The expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -110,10 +130,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-NotBe](https://pester.dev/docs/commands/Should-NotBe) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-NotBe](https://pester.dev/docs/commands/Should-NotBe) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-NotBeEmptyString.mdx b/docs/commands/Should-NotBeEmptyString.mdx index e24891e3..4460c305 100644 --- a/docs/commands/Should-NotBeEmptyString.mdx +++ b/docs/commands/Should-NotBeEmptyString.mdx @@ -1,7 +1,7 @@ --- id: Should-NotBeEmptyString title: Should-NotBeEmptyString -description: Help page for the PowerShell Pester "Should-NotBeEmptyString" command +description: Help for Pester command 'Should-NotBeEmptyString'. Ensures that the input is a string, and that the input is not $null or empty string. keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Ensures that the input is a string, and that the input is not $null or empty str ## SYNTAX ```powershell -Should-NotBeEmptyString [[-Actual] ] [-Because ] [] +Should-NotBeEmptyString [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -69,15 +69,20 @@ All the tests above will fail, the input is not a string. The actual value that will be compared. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Because @@ -85,23 +90,33 @@ Accept wildcard characters: False The reason why the input should be a string that is not $null or empty. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -114,10 +129,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-NotBeEmptyString](https://pester.dev/docs/commands/Should-NotBeEmptyString) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-NotBeEmptyString](https://pester.dev/docs/commands/Should-NotBeEmptyString) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-NotBeLikeString.mdx b/docs/commands/Should-NotBeLikeString.mdx index 4a1b976f..baf2c1fb 100644 --- a/docs/commands/Should-NotBeLikeString.mdx +++ b/docs/commands/Should-NotBeLikeString.mdx @@ -1,7 +1,7 @@ --- id: Should-NotBeLikeString title: Should-NotBeLikeString -description: Help page for the PowerShell Pester "Should-NotBeLikeString" command +description: Help for Pester command 'Should-NotBeLikeString'. Asserts that the actual value is not like the expected value. keywords: - PowerShell - Pester @@ -23,8 +23,8 @@ Asserts that the actual value is not like the expected value. ## SYNTAX ```powershell -Should-NotBeLikeString [[-Actual] ] [-Expected] [-CaseSensitive] [-Because ] - [] +Should-NotBeLikeString [-Expected] [[-Actual] ] [-CaseSensitive] + [-Because ] ``` ## DESCRIPTION @@ -57,31 +57,41 @@ This assertion will fail, because the actual value is like the expected value. The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected value. +The reason why the actual value should not be like the expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CaseSensitive @@ -89,39 +99,54 @@ Accept wildcard characters: False Indicates that the comparison should be case-sensitive. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the actual value should not be like the expected value. +The expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -136,10 +161,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-NotBeLikeString](https://pester.dev/docs/commands/Should-NotBeLikeString) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-NotBeLikeString](https://pester.dev/docs/commands/Should-NotBeLikeString) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-NotBeNull.mdx b/docs/commands/Should-NotBeNull.mdx index 5d9b4a75..cb4c7af1 100644 --- a/docs/commands/Should-NotBeNull.mdx +++ b/docs/commands/Should-NotBeNull.mdx @@ -1,7 +1,7 @@ --- id: Should-NotBeNull title: Should-NotBeNull -description: Help page for the PowerShell Pester "Should-NotBeNull" command +description: Help for Pester command 'Should-NotBeNull'. Asserts that the input is not `$null`. keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Asserts that the input is not `$null`. ## SYNTAX ```powershell -Should-NotBeNull [[-Actual] ] [-Because ] [] +Should-NotBeNull [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -49,15 +49,20 @@ These assertions will pass, because the actual value is not `$null. The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Because @@ -65,23 +70,33 @@ Accept wildcard characters: False The reason why the input should not be `$null`. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -94,10 +109,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-NotBeNull](https://pester.dev/docs/commands/Should-NotBeNull) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-NotBeNull](https://pester.dev/docs/commands/Should-NotBeNull) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-NotBeSame.mdx b/docs/commands/Should-NotBeSame.mdx index e2ae196d..466dda13 100644 --- a/docs/commands/Should-NotBeSame.mdx +++ b/docs/commands/Should-NotBeSame.mdx @@ -1,7 +1,7 @@ --- id: Should-NotBeSame title: Should-NotBeSame -description: Help page for the PowerShell Pester "Should-NotBeSame" command +description: Help for Pester command 'Should-NotBeSame'. Compares the expected value to actual value, to see if the actual value is not the same instance as the expected value. keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Compares the expected value to actual value, to see if the actual value is not t ## SYNTAX ```powershell -Should-NotBeSame [[-Actual] ] [-Expected] [-Because ] [] +Should-NotBeSame [-Expected] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -58,55 +58,75 @@ This assertion will fail, because the actual value is the same instance as the e The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected value. +The reason why the input should not be the expected value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the input should not be the expected value. +The expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -121,10 +141,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-NotBeSame](https://pester.dev/docs/commands/Should-NotBeSame) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-NotBeSame](https://pester.dev/docs/commands/Should-NotBeSame) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-NotBeString.mdx b/docs/commands/Should-NotBeString.mdx index 925f0a1c..bd1259f5 100644 --- a/docs/commands/Should-NotBeString.mdx +++ b/docs/commands/Should-NotBeString.mdx @@ -1,7 +1,7 @@ --- id: Should-NotBeString title: Should-NotBeString -description: Help page for the PowerShell Pester "Should-NotBeString" command +description: Help for Pester command 'Should-NotBeString'. Asserts that the actual value is not equal to the expected value. keywords: - PowerShell - Pester @@ -23,8 +23,8 @@ Asserts that the actual value is not equal to the expected value. ## SYNTAX ```powershell -Should-NotBeString [[-Actual] ] [[-Expected] ] [-Because ] [-CaseSensitive] - [-IgnoreWhitespace] [] +Should-NotBeString [[-Expected] ] [[-Actual] ] [-Because ] [-CaseSensitive] + [-IgnoreWhitespace] ``` ## DESCRIPTION @@ -57,63 +57,83 @@ This assertion will fail, because the actual value is equal to the expected valu The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected value. +The reason why the actual value should not be equal to the expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -CaseSensitive -The reason why the actual value should not be equal to the expected value. +Indicates that the comparison should be case-sensitive. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -CaseSensitive +### -Expected -Indicates that the comparison should be case-sensitive. +The expected value. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -IgnoreWhitespace @@ -121,23 +141,33 @@ Accept wildcard characters: False Indicates that the comparison should ignore whitespace. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -152,10 +182,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-NotBeString](https://pester.dev/docs/commands/Should-NotBeString) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-NotBeString](https://pester.dev/docs/commands/Should-NotBeString) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-NotBeWhiteSpaceString.mdx b/docs/commands/Should-NotBeWhiteSpaceString.mdx index c00369fd..14790aeb 100644 --- a/docs/commands/Should-NotBeWhiteSpaceString.mdx +++ b/docs/commands/Should-NotBeWhiteSpaceString.mdx @@ -1,7 +1,7 @@ --- id: Should-NotBeWhiteSpaceString title: Should-NotBeWhiteSpaceString -description: Help page for the PowerShell Pester "Should-NotBeWhiteSpaceString" command +description: Help for Pester command 'Should-NotBeWhiteSpaceString'. Ensures that the input is a string, and that the input is not $null, empty, or whitespace only string. keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Ensures that the input is a string, and that the input is not $null, empty, or w ## SYNTAX ```powershell -Should-NotBeWhiteSpaceString [[-Actual] ] [-Because ] [] +Should-NotBeWhiteSpaceString [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -70,15 +70,20 @@ All the tests above will fail, the input is not a string. The actual value that will be compared. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Because @@ -86,23 +91,33 @@ Accept wildcard characters: False The reason why the input should be a string that is not $null, empty, or whitespace only string. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -115,10 +130,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-NotBeWhiteSpaceString](https://pester.dev/docs/commands/Should-NotBeWhiteSpaceString) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-NotBeWhiteSpaceString](https://pester.dev/docs/commands/Should-NotBeWhiteSpaceString) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-NotContainCollection.mdx b/docs/commands/Should-NotContainCollection.mdx index e8257bf1..8784fde9 100644 --- a/docs/commands/Should-NotContainCollection.mdx +++ b/docs/commands/Should-NotContainCollection.mdx @@ -1,7 +1,7 @@ --- id: Should-NotContainCollection title: Should-NotContainCollection -description: Help page for the PowerShell Pester "Should-NotContainCollection" command +description: Help for Pester command 'Should-NotContainCollection'. Checks that the expected collection is not present in the actual collection as an ordered subsequence. It does not compare the types of the input collections. keywords: - PowerShell - Pester @@ -18,13 +18,12 @@ Contributions are welcome in [Pester-repo](https://github.com/pester/pester). ## SYNOPSIS -Checks that the expected collection is not present in the actual collection as an ordered subsequence. -It does not compare the types of the input collections. +Checks that the expected collection is not present in the actual collection as an ordered subsequence. It does not compare the types of the input collections. ## SYNTAX ```powershell -Should-NotContainCollection [[-Actual] ] [-Expected] [-Because ] [] +Should-NotContainCollection [-Expected] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -64,56 +63,76 @@ Gaps between them, as in `@(1, 3)`, are allowed. The collection to search in. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -One or more items to look for as an ordered subsequence. -A single value is treated as a one-item collection. +The reason why the input should be the expected value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the input should be the expected value. +One or more items to look for as an ordered subsequence. +A single value is treated as a one-item collection. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -126,10 +145,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-NotContainCollection](https://pester.dev/docs/commands/Should-NotContainCollection) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-NotContainCollection](https://pester.dev/docs/commands/Should-NotContainCollection) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-NotHaveParameter.mdx b/docs/commands/Should-NotHaveParameter.mdx index 44f3d8b3..b0a118de 100644 --- a/docs/commands/Should-NotHaveParameter.mdx +++ b/docs/commands/Should-NotHaveParameter.mdx @@ -1,7 +1,7 @@ --- id: Should-NotHaveParameter title: Should-NotHaveParameter -description: Help page for the PowerShell Pester "Should-NotHaveParameter" command +description: Help for Pester command 'Should-NotHaveParameter'. Asserts that a command has does not have the parameter. keywords: - PowerShell - Pester @@ -23,8 +23,7 @@ Asserts that a command has does not have the parameter. ## SYNTAX ```powershell -Should-NotHaveParameter [[-ParameterName] ] [[-Actual] ] [[-Because] ] - [] +Should-NotHaveParameter [[-ParameterName] ] [[-Actual] ] [[-Because] ] ``` ## DESCRIPTION @@ -57,24 +56,6 @@ This is useful for guarding against accidentally adding parameters you want to k ## PARAMETERS -### -ParameterName - -The name of the parameter to check. -E.g. -Uri - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -Actual The actual command to check. @@ -82,15 +63,20 @@ E.g. Get-Command "Invoke-WebRequest" ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Because @@ -98,23 +84,56 @@ Accept wildcard characters: False The reason why the input should be the expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -ParameterName + +The name of the parameter to check. +E.g. +Uri + +```yaml +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -127,10 +146,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-NotHaveParameter](https://pester.dev/docs/commands/Should-NotHaveParameter) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-NotHaveParameter](https://pester.dev/docs/commands/Should-NotHaveParameter) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-NotHaveType.mdx b/docs/commands/Should-NotHaveType.mdx index 1fa4c824..6ae4e71c 100644 --- a/docs/commands/Should-NotHaveType.mdx +++ b/docs/commands/Should-NotHaveType.mdx @@ -1,7 +1,7 @@ --- id: Should-NotHaveType title: Should-NotHaveType -description: Help page for the PowerShell Pester "Should-NotHaveType" command +description: Help for Pester command 'Should-NotHaveType'. Asserts that the input is not of the expected type. keywords: - PowerShell - Pester @@ -23,7 +23,7 @@ Asserts that the input is not of the expected type. ## SYNTAX ```powershell -Should-NotHaveType [[-Actual] ] [-Expected] [-Because ] [] +Should-NotHaveType [-Expected] [[-Actual] ] [-Because ] ``` ## DESCRIPTION @@ -49,55 +49,75 @@ These assertions will pass, because the actual value is not of the expected type The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected type. +The reason why the input should not be the expected type. ```yaml -Type: Type -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the input should not be the expected type. +The expected type. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Type +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -112,10 +132,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-NotHaveType](https://pester.dev/docs/commands/Should-NotHaveType) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-NotHaveType](https://pester.dev/docs/commands/Should-NotHaveType) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-NotInvoke.mdx b/docs/commands/Should-NotInvoke.mdx index 815eff5e..57713cef 100644 --- a/docs/commands/Should-NotInvoke.mdx +++ b/docs/commands/Should-NotInvoke.mdx @@ -1,7 +1,7 @@ --- id: Should-NotInvoke title: Should-NotInvoke -description: Help page for the PowerShell Pester "Should-NotInvoke" command +description: Help for Pester command 'Should-NotInvoke'. Checks that mocked command was not called and throws exception if it was. keywords: - PowerShell - Pester @@ -25,28 +25,28 @@ Checks that mocked command was not called and throws exception if it was. ### Default (Default) ```powershell -Should-NotInvoke [-CommandName] [[-Times] ] [-ParameterFilter ] - [-ExclusiveFilter ] [-ModuleName ] [-Scope ] [-Exactly] [-Because ] - [] +Should-NotInvoke [-CommandName] [[-Times] ] [-ParameterFilter ] + [-ExclusiveFilter ] [-ModuleName ] [-Scope ] [-Exactly] + [-Because ] ``` ### ExclusiveFilter ```powershell -Should-NotInvoke -ExclusiveFilter [] +Should-NotInvoke -ExclusiveFilter ``` ### Verifiable ```powershell -Should-NotInvoke [-Because ] [-Verifiable] [] +Should-NotInvoke [-Because ] [-Verifiable] ``` ## DESCRIPTION This command verifies that a mocked command has not been called a certain number -of times. -If the call history of the mocked command does not match the parameters +of times. + If the call history of the mocked command does not match the parameters passed to Should-NotInvoke, Should-NotInvoke will throw an exception. ## EXAMPLES @@ -103,109 +103,159 @@ Describe 'Remove-TempFile' { ## PARAMETERS -### -CommandName +### -Because -The mocked command whose call history should be checked. +The reason why the mock should be called. ```yaml -Type: String -Parameter Sets: Default -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Verifiable + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Default + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Times +### -CommandName -The number of times that the mock must be called to avoid an exception -from throwing. +The mocked command whose call history should be checked. ```yaml -Type: Int32 -Parameter Sets: Default -Aliases: - -Required: False -Position: 2 -Default value: 1 -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Default + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ParameterFilter +### -Exactly -An optional filter to qualify which calls should be counted. -Only those -calls to the mock whose parameters cause this filter to return true -will be counted. +If this switch is present, the number specified in Times must match +exactly the number of times the mock has been called. +Otherwise it +must match "at least" the number of times specified. + If the value +passed to the Times parameter is zero, the Exactly switch is implied. ```yaml -Type: ScriptBlock -Parameter Sets: Default -Aliases: - -Required: False -Position: Named -Default value: { $True } -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Default + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExclusiveFilter Like ParameterFilter, except when you use ExclusiveFilter, and there were any calls to the mocked command which do not match the filter, -an exception will be thrown. -This is a convenient way to avoid needing +an exception will be thrown. + This is a convenient way to avoid needing to have two calls to Should-NotInvoke like this: Should-NotInvoke SomeCommand -Times 1 -ParameterFilter \{ $something -eq $true \} Should-NotInvoke SomeCommand -Times 0 -ParameterFilter \{ $something -ne $true \} ```yaml -Type: ScriptBlock -Parameter Sets: Default -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: ExclusiveFilter + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Default + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` +### -ModuleName + +The module where the mock being checked was injected. + This is optional, +and must match the ModuleName that was used when setting up the Mock. + ```yaml -Type: ScriptBlock -Parameter Sets: ExclusiveFilter -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Default + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ModuleName +### -ParameterFilter -The module where the mock being checked was injected. -This is optional, -and must match the ModuleName that was used when setting up the Mock. +An optional filter to qualify which calls should be counted. +Only those +calls to the mock whose parameters cause this filter to return true +will be counted. ```yaml -Type: String -Parameter Sets: Default -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '{ $True }' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Default + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Scope @@ -222,52 +272,42 @@ Context, the command will identify all calls to the mocked command in the current Describe / Context block, as well as all child scopes of that block. ```yaml -Type: String -Parameter Sets: Default -Aliases: - -Required: False -Position: Named -Default value: 0 -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: 0 +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Default + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Exactly - -If this switch is present, the number specified in Times must match -exactly the number of times the mock has been called. -Otherwise it -must match "at least" the number of times specified. -If the value -passed to the Times parameter is zero, the Exactly switch is implied. - -```yaml -Type: SwitchParameter -Parameter Sets: Default -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Because +### -Times -The reason why the mock should be called. +The number of times that the mock must be called to avoid an exception +from throwing. ```yaml -Type: String -Parameter Sets: Default, Verifiable -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Int32 +DefaultValue: 1 +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Default + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Verifiable @@ -275,20 +315,28 @@ Accept wildcard characters: False Makes sure that all verifiable mocks were called. ```yaml -Type: SwitchParameter -Parameter Sets: Verifiable -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Verifiable + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -297,10 +345,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES The parameter filter passed to Should-NotInvoke does not necessarily have to match the parameter filter -(if any) which was used to create the Mock. -Should-NotInvoke will find any entry in the command history -which matches its parameter filter, regardless of how the Mock was created. -However, if any calls to the +(if any) which was used to create the Mock. + Should-NotInvoke will find any entry in the command history +which matches its parameter filter, regardless of how the Mock was created. + However, if any calls to the mocked command are made which did not match any mock's parameter filter (resulting in the original command being executed instead of a mock), these calls to the original command are not tracked in the call history. In other words, Should-NotInvoke can only be used to check for calls to the mocked implementation, not @@ -314,10 +362,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-NotInvoke](https://pester.dev/docs/commands/Should-NotInvoke) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-NotInvoke](https://pester.dev/docs/commands/Should-NotInvoke) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-NotMatchString.mdx b/docs/commands/Should-NotMatchString.mdx index 179ea94a..5550cb68 100644 --- a/docs/commands/Should-NotMatchString.mdx +++ b/docs/commands/Should-NotMatchString.mdx @@ -1,7 +1,7 @@ --- id: Should-NotMatchString title: Should-NotMatchString -description: Help page for the PowerShell Pester "Should-NotMatchString" command +description: Help for Pester command 'Should-NotMatchString'. Tests whether a string does not match a regular expression pattern. keywords: - PowerShell - Pester @@ -23,8 +23,7 @@ Tests whether a string does not match a regular expression pattern. ## SYNTAX ```powershell -Should-NotMatchString [[-Actual] ] [-Expected] [-CaseSensitive] [-Because ] - [] +Should-NotMatchString [-Expected] [[-Actual] ] [-CaseSensitive] [-Because ] ``` ## DESCRIPTION @@ -67,31 +66,41 @@ This assertion fails, because the actual value case-sensitively contains `failed The actual value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Expected +### -Because -The expected regular expression pattern. +The reason why the actual value should not match the regular expression pattern. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CaseSensitive @@ -99,39 +108,54 @@ Accept wildcard characters: False Indicates that the comparison should be case-sensitive. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -Expected -The reason why the actual value should not match the regular expression pattern. +The expected regular expression pattern. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES @@ -144,10 +168,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-NotMatchString](https://pester.dev/docs/commands/Should-NotMatchString) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-NotMatchString](https://pester.dev/docs/commands/Should-NotMatchString) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should-Throw.mdx b/docs/commands/Should-Throw.mdx index d38f28c3..ca117e51 100644 --- a/docs/commands/Should-Throw.mdx +++ b/docs/commands/Should-Throw.mdx @@ -1,7 +1,7 @@ --- id: Should-Throw title: Should-Throw -description: Help page for the PowerShell Pester "Should-Throw" command +description: Help for Pester command 'Should-Throw'. Asserts that a script block throws an exception. keywords: - PowerShell - Pester @@ -23,8 +23,9 @@ Asserts that a script block throws an exception. ## SYNTAX ```powershell -Should-Throw -ScriptBlock [[-ExceptionMessage] ] [[-FullyQualifiedErrorId] ] - [[-ExceptionType] ] [[-Because] ] [-AllowNonTerminatingError] [] +Should-Throw [[-ExceptionMessage] ] [[-FullyQualifiedErrorId] ] + [[-ExceptionType] ] [[-Because] ] -ScriptBlock + [-AllowNonTerminatingError] ``` ## DESCRIPTION @@ -59,54 +60,68 @@ The error record is returned from the assertion and can be used in further asser ## PARAMETERS -### -ScriptBlock +### -AllowNonTerminatingError -The script block that should throw an exception. +If set, the assertion will pass if a non-terminating error is thrown. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ExceptionMessage +### -Because -The message that the exception should contain. -`-like` wildcards are supported. +The reason why the input should be the expected value. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -FullyQualifiedErrorId +### -ExceptionMessage -The FullyQualifiedErrorId that the exception should contain. +The message that the exception should contain. `-like` wildcards are supported. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExceptionType @@ -114,55 +129,76 @@ Accept wildcard characters: False The type of exception that should be thrown. ```yaml -Type: Type -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Type +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Because +### -FullyQualifiedErrorId -The reason why the input should be the expected value. +The FullyQualifiedErrorId that the exception should contain. +`-like` wildcards are supported. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -AllowNonTerminatingError +### -ScriptBlock -If set, the assertion will pass if a non-terminating error is thrown. +The script block that should throw an exception. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: true + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Management.Automation.ScriptBlock + ## OUTPUTS ## NOTES @@ -175,10 +211,9 @@ See https://pester.dev/docs/assertions/soft-assertions for more about soft asser ## RELATED LINKS -[https://pester.dev/docs/commands/Should-Throw](https://pester.dev/docs/commands/Should-Throw) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should-Throw](https://pester.dev/docs/commands/Should-Throw) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/Should.mdx b/docs/commands/Should.mdx index e004e434..57ae88aa 100644 --- a/docs/commands/Should.mdx +++ b/docs/commands/Should.mdx @@ -1,7 +1,7 @@ --- id: Should title: Should -description: Help page for the PowerShell Pester "Should" command +description: Help for Pester command 'Should'. Should is a keyword that is used to define an assertion inside an It block. keywords: - PowerShell - Pester @@ -25,186 +25,176 @@ Should is a keyword that is used to define an assertion inside an It block. ### Be ```powershell -Should [[-ActualValue] ] [-Be] [-Not] [-ExpectedValue ] - [-Because ] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Be] [-Not] ``` ### BeExactly ```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeExactly] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] + [-BeExactly] ``` ### BeGreaterThan ```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeGreaterThan] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] + [-BeGreaterThan] ``` ### BeLessOrEqual ```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeLessOrEqual] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] + [-BeLessOrEqual] ``` ### BeIn ```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeIn] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] [-BeIn] ``` ### BeLessThan ```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeLessThan] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] + [-BeLessThan] ``` ### BeGreaterOrEqual ```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeGreaterOrEqual] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] + [-BeGreaterOrEqual] ``` ### BeLike ```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeLike] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] [-BeLike] ``` ### BeLikeExactly ```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeLikeExactly] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] + [-BeLikeExactly] ``` ### BeNullOrEmpty ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-BeNullOrEmpty] [] +Should [[-ActualValue] ] [[-Because] ] [-Not] [-BeNullOrEmpty] ``` ### BeOfType ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] [-BeOfType] - [-ExpectedType ] [] +Should [[-ActualValue] ] [[-ExpectedType] ] [[-Because] ] [-Not] [-BeOfType] ``` ### BeTrue ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] [-BeTrue] - [] +Should [[-ActualValue] ] [[-Because] ] [-Not] [-BeTrue] ``` ### BeFalse ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] [-BeFalse] - [] +Should [[-ActualValue] ] [[-Because] ] [-Not] [-BeFalse] ``` ### Contain ```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-Contain] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] [-Contain] ``` ### Exist ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] [-Exist] - [-LiteralPath] [] +Should [[-ActualValue] ] [[-Because] ] [-LiteralPath] [-Not] [-Exist] ``` ### FileContentMatch ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-FileContentMatch] [-ExpectedContent ] [] +Should [[-ActualValue] ] [[-ExpectedContent] ] [[-Because] ] [-Not] + [-FileContentMatch] ``` ### FileContentMatchExactly ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-ExpectedContent ] [-FileContentMatchExactly] [] +Should [[-ActualValue] ] [[-ExpectedContent] ] [[-Because] ] [-Not] + [-FileContentMatchExactly] ``` ### FileContentMatchMultiline ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-ExpectedContent ] [-FileContentMatchMultiline] [] +Should [[-ActualValue] ] [[-ExpectedContent] ] [[-Because] ] [-Not] + [-FileContentMatchMultiline] ``` ### FileContentMatchMultilineExactly ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-ExpectedContent ] [-FileContentMatchMultilineExactly] [] +Should [[-ActualValue] ] [[-ExpectedContent] ] [[-Because] ] [-Not] + [-FileContentMatchMultilineExactly] ``` ### HaveCount ```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-HaveCount] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] + [-HaveCount] ``` ### HaveParameter ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-HaveParameter] [-ParameterName ] [-Type ] [-DefaultValue ] [-Mandatory] - [-InParameterSet ] [-HasArgumentCompleter] [-Alias ] [] +Should [[-ActualValue] ] [[-ParameterName] ] [[-Type] ] + [[-DefaultValue] ] [-Mandatory] [[-InParameterSet] ] [-HasArgumentCompleter] + [[-Alias] ] [[-Because] ] [-Not] [-HaveParameter] ``` ### Match ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] [-Match] - [-RegularExpression ] [] +Should [[-ActualValue] ] [[-RegularExpression] ] [[-Because] ] [-Not] + [-Match] ``` ### MatchExactly ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-RegularExpression ] [-MatchExactly] [] +Should [[-ActualValue] ] [[-RegularExpression] ] [[-Because] ] [-Not] + [-MatchExactly] ``` ### Throw ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] [-Throw] - [-ExpectedMessage ] [-ErrorId ] [-ExceptionType ] [-PassThru] [] +Should [[-ActualValue] ] [[-ExpectedMessage] ] [[-ErrorId] ] + [[-ExceptionType] ] [[-Because] ] [-PassThru] [-Not] [-Throw] ``` ### InvokeVerifiable ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-InvokeVerifiable] [] +Should [[-ActualValue] ] [[-Because] ] [-Not] [-InvokeVerifiable] ``` ### Invoke ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] [-Invoke] - [-CommandName ] [-Times ] [-ParameterFilter ] [-ExclusiveFilter ] - [-ModuleName ] [-Scope ] [-Exactly] [-CallerSessionState ] - [-CommandDisplayName ] [] +Should [[-ActualValue] ] [[-CommandName] ] [[-Times] ] + [[-ParameterFilter] ] [[-ExclusiveFilter] ] [[-ModuleName] ] + [[-Scope] ] [-Exactly] [[-Because] ] [[-CallerSessionState] ] + [[-CommandDisplayName] ] [-Not] [-Invoke] ``` ## DESCRIPTION @@ -296,32 +286,41 @@ The actual value that was obtained in the test which should be verified against a expected value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: true +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Alias -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 7 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Be @@ -329,49 +328,214 @@ Accept wildcard characters: False Compares one object with another for equality and throws if the two objects are not the same. ```yaml -Type: SwitchParameter -Parameter Sets: Be -Aliases: EQ - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- EQ +ParameterSets: +- Name: Be + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Because -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Be + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeExactly + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterThan + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessOrEqual + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeIn + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessThan + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterOrEqual + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLike + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLikeExactly + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeNullOrEmpty + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeOfType + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeTrue + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeFalse + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Contain + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Exist + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatch + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchExactly + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchMultiline + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchMultilineExactly + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: HaveCount + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: HaveParameter + Position: 8 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Match + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: MatchExactly + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Throw + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: InvokeVerifiable + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Invoke + Position: 8 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeExactly -Compares one object with another for equality and throws if the two objects are not the same. -This comparison is case sensitive. +Compares one object with another for equality and throws if the two objects are not the same. This comparison is case sensitive. ```yaml -Type: SwitchParameter -Parameter Sets: BeExactly -Aliases: CEQ - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- CEQ +ParameterSets: +- Name: BeExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeFalse @@ -379,151 +543,192 @@ Accept wildcard characters: False Asserts that the value is false, or falsy. ```yaml -Type: SwitchParameter -Parameter Sets: BeFalse -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeFalse + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeGreaterOrEqual -Asserts that a number (or other comparable value) is greater than or equal to an expected value. -Uses PowerShell's -ge operator to compare the two values. +Asserts that a number (or other comparable value) is greater than or equal to an expected value. Uses PowerShell's -ge operator to compare the two values. ```yaml -Type: SwitchParameter -Parameter Sets: BeGreaterOrEqual -Aliases: GE - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- GE +ParameterSets: +- Name: BeGreaterOrEqual + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeGreaterThan -Asserts that a number (or other comparable value) is greater than an expected value. -Uses PowerShell's -gt operator to compare the two values. +Asserts that a number (or other comparable value) is greater than an expected value. Uses PowerShell's -gt operator to compare the two values. ```yaml -Type: SwitchParameter -Parameter Sets: BeGreaterThan -Aliases: GT - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- GT +ParameterSets: +- Name: BeGreaterThan + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeIn -Asserts that a collection of values contain a specific value. -Uses PowerShell's -contains operator to confirm. +Asserts that a collection of values contain a specific value. Uses PowerShell's -contains operator to confirm. ```yaml -Type: SwitchParameter -Parameter Sets: BeIn -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeIn + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeLessOrEqual -Asserts that a number (or other comparable value) is lower than, or equal to an expected value. -Uses PowerShell's -le operator to compare the two values. +Asserts that a number (or other comparable value) is lower than, or equal to an expected value. Uses PowerShell's -le operator to compare the two values. ```yaml -Type: SwitchParameter -Parameter Sets: BeLessOrEqual -Aliases: LE - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- LE +ParameterSets: +- Name: BeLessOrEqual + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeLessThan -Asserts that a number (or other comparable value) is lower than an expected value. -Uses PowerShell's -lt operator to compare the two values. +Asserts that a number (or other comparable value) is lower than an expected value. Uses PowerShell's -lt operator to compare the two values. ```yaml -Type: SwitchParameter -Parameter Sets: BeLessThan -Aliases: LT - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- LT +ParameterSets: +- Name: BeLessThan + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeLike -Asserts that the actual value matches a wildcard pattern using PowerShell's -like operator. -This comparison is not case-sensitive. +Asserts that the actual value matches a wildcard pattern using PowerShell's -like operator. This comparison is not case-sensitive. ```yaml -Type: SwitchParameter -Parameter Sets: BeLike -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeLike + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeLikeExactly -Asserts that the actual value matches a wildcard pattern using PowerShell's -like operator. -This comparison is case-sensitive. +Asserts that the actual value matches a wildcard pattern using PowerShell's -like operator. This comparison is case-sensitive. ```yaml -Type: SwitchParameter -Parameter Sets: BeLikeExactly -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeLikeExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeNullOrEmpty -Checks values for null or empty (strings). -The static [String]::IsNullOrEmpty() method is used to do the comparison. +Checks values for null or empty (strings). The static [String]::IsNullOrEmpty() method is used to do the comparison. ```yaml -Type: SwitchParameter -Parameter Sets: BeNullOrEmpty -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeNullOrEmpty + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeOfType @@ -531,15 +736,21 @@ Accept wildcard characters: False Asserts that the actual value should be an object of a specified type (or a subclass of the specified type) using PowerShell's -is operator. ```yaml -Type: SwitchParameter -Parameter Sets: BeOfType -Aliases: HaveType - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- HaveType +ParameterSets: +- Name: BeOfType + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeTrue @@ -547,288 +758,434 @@ Accept wildcard characters: False Asserts that the value is true, or truthy. ```yaml -Type: SwitchParameter -Parameter Sets: BeTrue -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeTrue + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CallerSessionState -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 9 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CommandDisplayName -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 10 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CommandName -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Contain -Asserts that collection contains a specific value. -Uses PowerShell's -contains operator to confirm. +Asserts that collection contains a specific value. Uses PowerShell's -contains operator to confirm. ```yaml -Type: SwitchParameter -Parameter Sets: Contain -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Contain + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -DefaultValue -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ErrorId -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Throw + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Exactly -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: SwitchParameter -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 7 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExceptionType -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Throw + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExclusiveFilter -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Exist -Does not perform any comparison, but checks if the object calling Exist is present in a PS Provider. -The object must have valid path syntax. -It essentially must pass a Test-Path call. +Does not perform any comparison, but checks if the object calling Exist is present in a PS Provider. The object must have valid path syntax. It essentially must pass a Test-Path call. ```yaml -Type: SwitchParameter -Parameter Sets: Exist -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Exist + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExpectedContent -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: FileContentMatch, FileContentMatchExactly, FileContentMatchMultiline, FileContentMatchMultilineExactly -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FileContentMatch + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchExactly + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchMultiline + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchMultilineExactly + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExpectedMessage -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Throw + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExpectedType -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: BeOfType -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeOfType + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExpectedValue -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Be, BeExactly, BeGreaterThan, BeLessOrEqual, BeIn, BeLessThan, BeGreaterOrEqual, BeLike, BeLikeExactly, Contain, HaveCount -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Be + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeExactly + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterThan + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessOrEqual + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeIn + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessThan + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterOrEqual + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLike + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLikeExactly + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Contain + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: HaveCount + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -FileContentMatch -Checks to see if a file contains the specified text. -This search is not case sensitive and uses regular expressions. +Checks to see if a file contains the specified text. This search is not case sensitive and uses regular expressions. ```yaml -Type: SwitchParameter -Parameter Sets: FileContentMatch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FileContentMatch + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -FileContentMatchExactly -Checks to see if a file contains the specified text. -This search is case sensitive and uses regular expressions to match the text. +Checks to see if a file contains the specified text. This search is case sensitive and uses regular expressions to match the text. ```yaml -Type: SwitchParameter -Parameter Sets: FileContentMatchExactly -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FileContentMatchExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -FileContentMatchMultiline @@ -838,15 +1195,20 @@ As opposed to FileContentMatch and FileContentMatchExactly operators, FileConten When using FileContentMatchMultiline operator, '^' and '$' represent the beginning and end of the whole file, instead of the beginning and end of a line ```yaml -Type: SwitchParameter -Parameter Sets: FileContentMatchMultiline -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FileContentMatchMultiline + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -FileContentMatchMultilineExactly @@ -856,32 +1218,41 @@ As opposed to FileContentMatch and FileContentMatchExactly operators, FileConten When using FileContentMatchMultilineExactly operator, '^' and '$' represent the beginning and end of the whole file, instead of the beginning and end of a line. ```yaml -Type: SwitchParameter -Parameter Sets: FileContentMatchMultilineExactly -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FileContentMatchMultilineExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -HasArgumentCompleter -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: SwitchParameter -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 6 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -HaveCount @@ -889,15 +1260,20 @@ Accept wildcard characters: False Asserts that a collection has the expected amount of items. ```yaml -Type: SwitchParameter -Parameter Sets: HaveCount -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveCount + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -HaveParameter @@ -905,32 +1281,41 @@ Accept wildcard characters: False Asserts that a command has the expected parameter. ```yaml -Type: SwitchParameter -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -InParameterSet -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 5 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Invoke @@ -938,117 +1323,147 @@ Accept wildcard characters: False Checks if a Mocked command has been called a certain number of times and throws an exception if it has not. ```yaml -Type: SwitchParameter -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -InvokeVerifiable -Checks if any Verifiable Mock has not been invoked. -If so, this will throw an exception. +Checks if any Verifiable Mock has not been invoked. If so, this will throw an exception. ```yaml -Type: SwitchParameter -Parameter Sets: InvokeVerifiable -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: InvokeVerifiable + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -LiteralPath -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: SwitchParameter -Parameter Sets: Exist -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Exist + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Mandatory -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: SwitchParameter -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Match -Uses a regular expression to compare two objects. -This comparison is not case sensitive. +Uses a regular expression to compare two objects. This comparison is not case sensitive. ```yaml -Type: SwitchParameter -Parameter Sets: Match -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Match + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -MatchExactly -Uses a regular expression to compare two objects. -This comparison is case sensitive. +Uses a regular expression to compare two objects. This comparison is case sensitive. ```yaml -Type: SwitchParameter -Parameter Sets: MatchExactly -Aliases: CMATCH - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- CMATCH +ParameterSets: +- Name: MatchExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ModuleName -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 5 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Not @@ -1056,169 +1471,366 @@ Accept wildcard characters: False Reverse the assertion ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Be + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterThan + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessOrEqual + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeIn + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessThan + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterOrEqual + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLike + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLikeExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeNullOrEmpty + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeOfType + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeTrue + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeFalse + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Contain + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Exist + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatch + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchMultiline + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchMultilineExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: HaveCount + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: HaveParameter + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Match + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: MatchExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Throw + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: InvokeVerifiable + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Invoke + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ParameterFilter -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ParameterName -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -PassThru -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: SwitchParameter -Parameter Sets: Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Throw + Position: 5 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -RegularExpression -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Match, MatchExactly -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Match + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: MatchExactly + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Scope -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 6 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Throw -Checks if an exception was thrown. -Enclose input in a scriptblock. +Checks if an exception was thrown. Enclose input in a scriptblock. ```yaml -Type: SwitchParameter -Parameter Sets: Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Throw + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Times -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Type -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/assertions/ for help. ```yaml -Type: Object -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES ## RELATED LINKS -[https://pester.dev/docs/commands/Should](https://pester.dev/docs/commands/Should) - -[https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) +- [https://pester.dev/docs/commands/Should](https://pester.dev/docs/commands/Should) +- [https://pester.dev/docs/assertions](https://pester.dev/docs/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 6.0.0-rc5](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 6.0.0](https://github.com/pester/pester).* diff --git a/docs/commands/docusaurus.sidebar.js b/docs/commands/docusaurus.sidebar.js index 58ff74d4..a8d1ee18 100644 --- a/docs/commands/docusaurus.sidebar.js +++ b/docs/commands/docusaurus.sidebar.js @@ -1,7 +1,7 @@ /** * Import this file in your Docusaurus `sidebars.js` file. * - * Auto-generated by Alt3.Docusaurus.Powershell 1.0.37. + * Auto-generated by Alt3.Docusaurus.Powershell 2.0.0. * * Copyright (c) 2019-present, ALT3 B.V. * diff --git a/generate-command-reference.ps1 b/generate-command-reference.ps1 index bf9733f8..9d52116b 100644 --- a/generate-command-reference.ps1 +++ b/generate-command-reference.ps1 @@ -8,8 +8,17 @@ .EXAMPLE .\generate-command-reference.ps1 + Update current (latest) docs using latest Pester version + + .EXAMPLE + .\generate-command-reference.ps1 -PesterVersion 6.0.0 + + Update current (latest) docs using Pester 6.0.0 explicitly + .EXAMPLE - .\generate-command-reference.ps1 -PesterVersion 4.10.1 + .\generate-command-reference.ps1 -PesterVersion 5.9.0 -DocsVersion v5 + + Update versioned docs for v5 using explicit version 5.9.0 .LINK https://docusaurus-powershell.netlify.app/docs/faq/ci-cd @@ -26,15 +35,15 @@ param ( Set-StrictMode -Version Latest $PSDefaultParameterValues['*:ErrorAction'] = 'Stop' -Write-Host 'Generating MDX files for website Command Reference' -BackgroundColor DarkGreen +Write-Host 'Generating MDX files for Command Reference-section of website' -BackgroundColor DarkGreen # ----------------------------------------------------------------------------- # Install required modules # ----------------------------------------------------------------------------- $ModuleList = [ordered]@{ - 'PlatyPS' = $PlatyPSVersion - 'Alt3.Docusaurus.PowerShell' = $DocusaurusVersion - 'Pester' = $PesterVersion + 'Microsoft.PowerShell.PlatyPS' = $PlatyPSVersion + 'Alt3.Docusaurus.PowerShell' = $DocusaurusVersion + 'Pester' = $PesterVersion } # Can't use the original enumerator here because we may modify the dictionary mid-process $ModuleList.Keys.Clone() | ForEach-Object { @@ -68,11 +77,40 @@ $ModuleList.Keys.Clone() | ForEach-Object { } } +Write-Host 'Pre-processing CommandHelp-objects' -ForegroundColor Magenta +$commandHelp = & { + # Workaround: Strict mode breaks PlatyPS (https://github.com/PowerShell/platyPS/issues/800) + Set-StrictMode -Off + New-CommandHelp -CommandInfo (Get-Command -Module Pester -CommandType Cmdlet, Function | Where-Object Version -eq $ModuleList.Pester) +} +$commandHelp | ForEach-Object { + # Customize the description metadata for each command to include the synopsis + # Synopsis is guaranteed by Help.Tests.ps1 in pester/pester-repo, but checking due to platyPS bugs. + if ($_.Synopsis -notmatch '^\{\{ Fill in') { + $_.Metadata['description'] = "Help for Pester command '$($_.Title)'. $($_.Synopsis -replace '\s+', ' ')" + } else { + $_.Metadata['description'] = "Help for Pester command '$($_.Title)'." + } + + # Fix Commands navbar link for v4. This is first command in v4 docs + if ($DocsVersion -eq 'v4' -and $_.Title -eq 'Add-AssertionOperator') { + $_.Metadata['id'] = 'Add-ShouldOperator' # Override id to have common docId for all versions + $_.Metadata['slug'] = $_.Title # Override slug so url still matches v4 name + } +} + # ----------------------------------------------------------------------------- # Use below settings to manipulate the rendered MDX files # ----------------------------------------------------------------------------- + +$contributeUrl = switch ($DocsVersion) { + 'Current' { 'https://github.com/pester/pester' } + 'v5' { 'https://github.com/pester/Pester/tree/rel/5.x.x' } + 'v4' { 'https://github.com/pester/Pester/tree/rel/4.x.x' } +} + $docusaurusOptions = @{ - Module = 'Pester' + CommandHelp = $commandHelp DocsFolder = switch ($DocsVersion) { 'Current' { "$PSScriptRoot/docs" } 'v5' { "$PSScriptRoot/versioned_docs/version-v5" } @@ -86,21 +124,20 @@ $docusaurusOptions = @{ 'SafeGetCommand' 'Set-DynamicParameterVariable' ) - MetaDescription = 'Help page for the PowerShell Pester "%1" command' MetaKeywords = @( 'PowerShell' 'Pester' 'Help' 'Documentation' ) - PrependMarkdown = @' + PrependMarkdown = @" :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester$(if ($DocsVersion -ne 'Current') { " $DocsVersion" })-repo]($contributeUrl). ::: -'@ +"@ AppendMarkdown = @" ## VERSION -*This page was generated using comment-based help in [Pester $($ModuleList.Pester)](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester $($ModuleList.Pester)]($contributeUrl).* "@ } @@ -121,13 +158,6 @@ New-DocusaurusHelp @docusaurusOptions function Repair-ExampleFences { <# - Pester's source comment-based help embeds Markdown code fences (```powershell - ... ```), including a 'powereshell' typo, inside its .EXAMPLE blocks. PlatyPS - double-wraps these, emitting mismatched fences - a bare ``` opening paired with - a ```powershell "closing" fence, sometimes doubled up. MDX 3 then mispairs the - fences, treating an example's PowerShell '@{ ... }' as a JSX expression, which - breaks the Docusaurus build ("Could not parse expression with acorn"). - Normalize fences inside the EXAMPLES section only: collapse runs of adjacent fence lines and alternate them open/close per example, so each example becomes a single well-formed ```powershell code block followed by its description. The @@ -177,7 +207,7 @@ function Repair-ExampleFences { } if (-not $inCode) { $lang = $langs | Where-Object { $_ -ne '' } | Select-Object -First 1 - if (-not $lang -or $lang -eq 'powereshell') { $lang = 'powershell' } + if (-not $lang) { $lang = 'powershell' } $result.Add('```' + $lang) $inCode = $true } @@ -194,64 +224,19 @@ function Repair-ExampleFences { return ($result -join $eol) } -function Format-SyntaxCommonParameters { - # After ProgressAction is removed, '[]' is collapsed back inline. - # PlatyPS keeps it inline only while the SYNTAX line stays within its wrap width - # (~110 chars, measured from prior generated output) and otherwise wraps it onto its - # own continuation line. Reproduce that so we neither leave overly long lines nor - # dangling orphans. Only lines that still carry content before the token are wrapped; - # lines that are already just ' []' are left untouched. - param([string] $Content, [int] $MaxWidth = 110) - - $eol = if ($Content -match "`r`n") { "`r`n" } else { "`n" } - $lines = $Content -split "`r?`n" - $out = [System.Collections.Generic.List[string]]::new() - foreach ($line in $lines) { - if ($line.Length -gt $MaxWidth -and $line -match '\S[ ]\[\][ ]*$') { - $head = $line -replace '[ ]*\[\][ ]*$', '' - $out.Add($head) - $out.Add(' []') - } - else { - $out.Add($line) - } - } - return ($out -join $eol) -} - # ----------------------------------------------------------------------------- # Post-process the generated MDX: -# * Strip the spurious ProgressAction common parameter that PlatyPS emits on -# PowerShell 7.4+ (https://github.com/PowerShell/platyPS/issues/663). Pester 6 -# loads a .NET 8 assembly and therefore requires PowerShell 7.4+, so the docs -# can no longer be generated on an older PowerShell to avoid this. # * Repair the mismatched code fences PlatyPS emits for .EXAMPLE blocks that # contain their own Markdown fences (see Repair-ExampleFences) so the MDX # compiles. -# The '[]' SYNTAX entry and the '### CommonParameters' section are -# kept as PlatyPS produces them. Because the ProgressAction token is longer than -# '[]' and always sits right before it, removing ProgressAction can -# leave '[]' orphaned on a wrapped continuation line. The first -# replacement handles that case by pulling '[]' back onto the line -# ProgressAction occupied; the second removes any remaining ProgressAction token, -# whether inline or wrapped onto its own line. Format-SyntaxCommonParameters then wraps -# '[]' back onto its own line where the result would exceed PlatyPS's -# syntax wrap width, matching the layout PlatyPS produces without ProgressAction. # ----------------------------------------------------------------------------- -Write-Host 'Post-processing generated MDX files (ProgressAction, example fences)' -ForegroundColor Magenta +Write-Host 'Post-processing generated MDX files' -ForegroundColor Magenta $commandsFolder = Join-Path -Path $docusaurusOptions.DocsFolder -ChildPath $docusaurusOptions.Sidebar Get-ChildItem -Path $commandsFolder -Filter '*.mdx' | ForEach-Object { $content = Get-Content -LiteralPath $_.FullName -Raw - # Pull '[]' back up when removing ProgressAction would orphan it - $updated = $content -replace '[ ]*\[-ProgressAction \][ ]*\r?\n[ ]*\[\]', ' []' - # Remove any remaining ' [-ProgressAction ]' from the SYNTAX code-blocks - $updated = $updated -replace '[ ]*(\r?\n[ ]*)?\[-ProgressAction \]', '' - # Remove the dedicated '### -ProgressAction' section up to the next '### ' heading - $updated = $updated -replace '(?ms)^### -ProgressAction\r?\n.*?(?=^### )', '' - # Re-wrap '[]' onto its own line where the SYNTAX line is too long - $updated = Format-SyntaxCommonParameters -Content $updated # Fix mismatched code fences inside the EXAMPLES section - $updated = Repair-ExampleFences -Content $updated + # TODO: Remove? Not really needed. Only fixed two earlier typos in pester/pester repo. + $updated = Repair-ExampleFences -Content $content if ($updated -ne $content) { Set-Content -LiteralPath $_.FullName -Value $updated -NoNewline -Encoding utf8 } diff --git a/static/img/logo.svg b/static/img/logo.svg deleted file mode 100644 index 9db6d0d0..00000000 --- a/static/img/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/static/img/undraw_docusaurus_mountain.svg b/static/img/undraw_docusaurus_mountain.svg deleted file mode 100644 index 431cef2f..00000000 --- a/static/img/undraw_docusaurus_mountain.svg +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/static/img/undraw_docusaurus_react.svg b/static/img/undraw_docusaurus_react.svg deleted file mode 100644 index e4170504..00000000 --- a/static/img/undraw_docusaurus_react.svg +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/static/img/undraw_docusaurus_tree.svg b/static/img/undraw_docusaurus_tree.svg deleted file mode 100644 index a05cc03d..00000000 --- a/static/img/undraw_docusaurus_tree.svg +++ /dev/null @@ -1 +0,0 @@ -docu_tree \ No newline at end of file diff --git a/versioned_docs/version-v4/commands/Add-AssertionOperator.mdx b/versioned_docs/version-v4/commands/Add-AssertionOperator.mdx index 5462690e..361b6f35 100644 --- a/versioned_docs/version-v4/commands/Add-AssertionOperator.mdx +++ b/versioned_docs/version-v4/commands/Add-AssertionOperator.mdx @@ -1,20 +1,22 @@ --- -# 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 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 hide_title: false hide_table_of_contents: false custom_edit_url: null +slug: Add-AssertionOperator --- +:::info This page was generated +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). +::: + ## SYNOPSIS Register an Assertion Operator with Pester @@ -22,8 +24,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 +39,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 +70,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 +193,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/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/AfterAll.mdx b/versioned_docs/version-v4/commands/AfterAll.mdx index 8beb035e..2cc2a590 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 v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). +::: + ## 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/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/AfterEach.mdx b/versioned_docs/version-v4/commands/AfterEach.mdx index b9df474e..701eb1c4 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 v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). +::: + ## 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/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/AfterEachFeature.mdx b/versioned_docs/version-v4/commands/AfterEachFeature.mdx index 589732f7..d33c5f3c 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 v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). +::: + ## 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/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/AfterEachScenario.mdx b/versioned_docs/version-v4/commands/AfterEachScenario.mdx index ef27578a..3b17b5e5 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 v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). +::: + ## 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/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/Assert-MockCalled.mdx b/versioned_docs/version-v4/commands/Assert-MockCalled.mdx index 04062211..3226bab7 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 v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). +::: + ## 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/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/Assert-VerifiableMock.mdx b/versioned_docs/version-v4/commands/Assert-VerifiableMock.mdx index 7730d001..1bfeaf2e 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 v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). +::: + ## 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/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/Assert-VerifiableMocks.mdx b/versioned_docs/version-v4/commands/Assert-VerifiableMocks.mdx index 77388e7a..9a5af08c 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 v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). +::: + ## 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/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/BeforeAll.mdx b/versioned_docs/version-v4/commands/BeforeAll.mdx index 217c02a7..7ec21dae 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 v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). +::: + ## 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/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/BeforeEach.mdx b/versioned_docs/version-v4/commands/BeforeEach.mdx index a370a968..376cd27c 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 v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). +::: + ## 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/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/BeforeEachFeature.mdx b/versioned_docs/version-v4/commands/BeforeEachFeature.mdx index f32c7e97..422d9c2e 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 v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). +::: + ## 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/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/BeforeEachScenario.mdx b/versioned_docs/version-v4/commands/BeforeEachScenario.mdx index ac56b906..2ab7d0f9 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 v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). +::: + ## 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/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/Context.mdx b/versioned_docs/version-v4/commands/Context.mdx index 8fae6305..7c3499fd 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 v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). +::: + ## 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/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/Describe.mdx b/versioned_docs/version-v4/commands/Describe.mdx index af5e4564..90c6e106 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 v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). +::: + ## 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/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/Find-GherkinStep.mdx b/versioned_docs/version-v4/commands/Find-GherkinStep.mdx index 8928971d..8f209765 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 v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). +::: + ## 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/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/Get-ShouldOperator.mdx b/versioned_docs/version-v4/commands/Get-ShouldOperator.mdx index f65f77d5..c5ee5531 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 v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). +::: + ## 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/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/Get-TestDriveItem.mdx b/versioned_docs/version-v4/commands/Get-TestDriveItem.mdx index 98f29c28..d447e730 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 v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). +::: + ## 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/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/GherkinStep.mdx b/versioned_docs/version-v4/commands/GherkinStep.mdx index 11090115..78164d16 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 v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). +::: + ## 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/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/In.mdx b/versioned_docs/version-v4/commands/In.mdx index 5de4ee8a..005597f3 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 v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). +::: + ## 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/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/InModuleScope.mdx b/versioned_docs/version-v4/commands/InModuleScope.mdx index e9444552..136f6e92 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 v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). +::: + ## 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/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/Invoke-Gherkin.mdx b/versioned_docs/version-v4/commands/Invoke-Gherkin.mdx index 6d496492..ee67ad8f 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 v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). +::: + ## 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/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/Invoke-Pester.mdx b/versioned_docs/version-v4/commands/Invoke-Pester.mdx index 41081c65..6b28d73d 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 v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). +::: + ## 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/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/It.mdx b/versioned_docs/version-v4/commands/It.mdx index 37ab6039..b8330ab3 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 v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). +::: + ## 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/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/Mock.mdx b/versioned_docs/version-v4/commands/Mock.mdx index 31f092b1..27cc8fc1 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 v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). +::: + ## 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/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/New-Fixture.mdx b/versioned_docs/version-v4/commands/New-Fixture.mdx index 961d4a9c..562c13e8 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 v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). +::: + ## 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/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/New-MockObject.mdx b/versioned_docs/version-v4/commands/New-MockObject.mdx index eaf121b2..4b7aa440 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 v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). +::: + ## 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/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/New-PesterOption.mdx b/versioned_docs/version-v4/commands/New-PesterOption.mdx index 3019af87..8030dfdb 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 v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). +::: + ## 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/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/Set-ItResult.mdx b/versioned_docs/version-v4/commands/Set-ItResult.mdx index f5c429f3..4bd5231e 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 v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). +::: + ## 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/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/Set-TestInconclusive.mdx b/versioned_docs/version-v4/commands/Set-TestInconclusive.mdx index bad67887..67ffd137 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 v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). +::: + ## 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/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/Setup.mdx b/versioned_docs/version-v4/commands/Setup.mdx index 2ce61859..02f06e1a 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'. This command is included in the Pester Mocking framework for backwards compatibility. You do not need to call it directly. keywords: - - Powershell + - PowerShell - Pester - Help - Documentation @@ -12,15 +12,19 @@ hide_table_of_contents: false custom_edit_url: null --- +:::info This page was generated +Contributions are welcome in [Pester v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). +::: + ## SYNOPSIS This command is included in the Pester Mocking framework for backwards compatibility. -You do not need to call it directly. +You do not need to call it directly ## SYNTAX ```powershell -Setup [-Dir] [-File] [[-Path] ] [[-Content] ] [-PassThru] +Setup [[-Path] ] [[-Content] ] [-Dir] [-File] [-PassThru] ``` ## DESCRIPTION @@ -39,84 +43,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 +156,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/tree/rel/4.x.x).* diff --git a/versioned_docs/version-v4/commands/Should.mdx b/versioned_docs/version-v4/commands/Should.mdx index f2df0b06..3ef970a3 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 v4-repo](https://github.com/pester/Pester/tree/rel/4.x.x). +::: + ## 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/tree/rel/4.x.x).* 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. * diff --git a/versioned_docs/version-v5/commands/Add-ShouldOperator.mdx b/versioned_docs/version-v5/commands/Add-ShouldOperator.mdx index cc931bc6..3598db70 100644 --- a/versioned_docs/version-v5/commands/Add-ShouldOperator.mdx +++ b/versioned_docs/version-v5/commands/Add-ShouldOperator.mdx @@ -1,7 +1,7 @@ --- id: Add-ShouldOperator title: Add-ShouldOperator -description: Help page for the PowerShell Pester "Add-ShouldOperator" command +description: Help for Pester command 'Add-ShouldOperator'. Register a Should Operator with Pester keywords: - PowerShell - Pester @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -23,8 +23,8 @@ Register a Should Operator with Pester ## SYNTAX ```powershell -Add-ShouldOperator [-Name] [-Test] [[-Alias] ] [[-InternalName] ] - [-SupportsArrayInput] [] +Add-ShouldOperator [-Name] [-Test] [[-Alias] ] + [[-InternalName] ] [-SupportsArrayInput] ``` ## DESCRIPTION @@ -67,92 +67,120 @@ Example of how to create a simple custom assertion that checks if the input stri ## PARAMETERS -### -Name +### -Alias -The name of the assertion. -This will become a Named Parameter of Should. +A list of aliases for the Named Parameter. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Test +### -InternalName -The test function. -The function must return a PSObject with a [Bool]succeeded and a [string]failureMessage property. +If -Name is different from the actual function name, record the actual function name here. +Used by Get-ShouldOperator to pull function help. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Alias +### -Name -A list of aliases for the Named Parameter. +The name of the assertion. +This will become a Named Parameter of Should. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -InternalName +### -SupportsArrayInput -If -Name is different from the actual function name, record the actual function name here. -Used by Get-ShouldOperator to pull function help. +Does the test function support the passing an array of values to test. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -SupportsArrayInput +### -Test -Does the test function support the passing an array of values to test. +The test function. +The function must return a PSObject with a [Bool]succeeded and a [string]failureMessage property. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -162,8 +190,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/Add-ShouldOperator](https://pester.dev/docs/v5/commands/Add-ShouldOperator) +- [https://pester.dev/docs/v5/commands/Add-ShouldOperator](https://pester.dev/docs/v5/commands/Add-ShouldOperator) ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/AfterAll.mdx b/versioned_docs/version-v5/commands/AfterAll.mdx index e7735c35..45f471e7 100644 --- a/versioned_docs/version-v5/commands/AfterAll.mdx +++ b/versioned_docs/version-v5/commands/AfterAll.mdx @@ -1,7 +1,7 @@ --- id: AfterAll title: AfterAll -description: Help page for the PowerShell Pester "AfterAll" command +description: Help for Pester command 'AfterAll'. Defines a series of steps to perform at the end of the current container, Context or Describe block. keywords: - PowerShell - Pester @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -24,7 +24,7 @@ Context or Describe block. ## SYNTAX ```powershell -AfterAll [-Scriptblock] [] +AfterAll [-Scriptblock] ``` ## DESCRIPTION @@ -78,20 +78,28 @@ the tests in the Describe-block. A scriptblock with steps to be executed during teardown. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -101,10 +109,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/AfterAll](https://pester.dev/docs/v5/commands/AfterAll) - -[https://pester.dev/docs/v5/usage/setup-and-teardown](https://pester.dev/docs/v5/usage/setup-and-teardown) +- [https://pester.dev/docs/v5/commands/AfterAll](https://pester.dev/docs/v5/commands/AfterAll) +- [https://pester.dev/docs/v5/usage/setup-and-teardown](https://pester.dev/docs/v5/usage/setup-and-teardown) ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/AfterEach.mdx b/versioned_docs/version-v5/commands/AfterEach.mdx index ebd7bf62..2a237c8d 100644 --- a/versioned_docs/version-v5/commands/AfterEach.mdx +++ b/versioned_docs/version-v5/commands/AfterEach.mdx @@ -1,7 +1,7 @@ --- id: AfterEach title: AfterEach -description: Help page for the PowerShell Pester "AfterEach" command +description: Help for Pester command 'AfterEach'. Defines a series of steps to perform at the end of every It block within the current Context or Describe block. keywords: - PowerShell - Pester @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -24,7 +24,7 @@ the current Context or Describe block. ## SYNTAX ```powershell -AfterEach [-Scriptblock] [] +AfterEach [-Scriptblock] ``` ## DESCRIPTION @@ -75,20 +75,28 @@ The example uses AfterEach to remove a temporary file after each test. A scriptblock with steps to be executed during teardown. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -98,10 +106,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/AfterEach](https://pester.dev/docs/v5/commands/AfterEach) - -[https://pester.dev/docs/v5/usage/setup-and-teardown](https://pester.dev/docs/v5/usage/setup-and-teardown) +- [https://pester.dev/docs/v5/commands/AfterEach](https://pester.dev/docs/v5/commands/AfterEach) +- [https://pester.dev/docs/v5/usage/setup-and-teardown](https://pester.dev/docs/v5/usage/setup-and-teardown) ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Assert-MockCalled.mdx b/versioned_docs/version-v5/commands/Assert-MockCalled.mdx index 0d6bfc28..df680dfc 100644 --- a/versioned_docs/version-v5/commands/Assert-MockCalled.mdx +++ b/versioned_docs/version-v5/commands/Assert-MockCalled.mdx @@ -1,7 +1,7 @@ --- id: Assert-MockCalled title: Assert-MockCalled -description: Help page for the PowerShell Pester "Assert-MockCalled" command +description: Help for Pester command 'Assert-MockCalled'. Checks if a Mocked command has been called a certain number of times and throws an exception if it has not. keywords: - PowerShell - Pester @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -29,15 +29,15 @@ USE Should -Invoke INSTEAD. ### ParameterFilter (Default) ```powershell -Assert-MockCalled [-CommandName] [[-Times] ] [-ParameterFilter ] - [-ModuleName ] [-Scope ] [-Exactly] [] +Assert-MockCalled [-CommandName] [[-Times] ] [-ParameterFilter ] + [-ModuleName ] [-Scope ] [-Exactly] ``` ### ExclusiveFilter ```powershell -Assert-MockCalled [-CommandName] [[-Times] ] [-ParameterFilter ] - -ExclusiveFilter [-ModuleName ] [-Scope ] [-Exactly] [] +Assert-MockCalled [-CommandName] [[-Times] ] -ExclusiveFilter + [-ParameterFilter ] [-ModuleName ] [-Scope ] [-Exactly] ``` ## DESCRIPTION @@ -61,79 +61,104 @@ PS C:\> {{ Add example code here }} \{\{ Fill CommandName Description \}\} ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Times +### -Exactly -\{\{ Fill Times Description \}\} +\{\{ Fill Exactly Description \}\} ```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: 1 -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ParameterFilter +### -ExclusiveFilter -\{\{ Fill ParameterFilter Description \}\} +\{\{ Fill ExclusiveFilter Description \}\} ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: { $True } -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: ExclusiveFilter + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ExclusiveFilter +### -ModuleName -\{\{ Fill ExclusiveFilter Description \}\} +\{\{ Fill ModuleName Description \}\} ```yaml -Type: ScriptBlock -Parameter Sets: ExclusiveFilter -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ModuleName +### -ParameterFilter -\{\{ Fill ModuleName Description \}\} +\{\{ Fill ParameterFilter Description \}\} ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '{ $True }' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Scope @@ -141,36 +166,49 @@ Accept wildcard characters: False \{\{ Fill Scope Description \}\} ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: 0 -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: 0 +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Exactly +### -Times -\{\{ Fill Exactly Description \}\} +\{\{ Fill Times Description \}\} ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Int32 +DefaultValue: 1 +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -180,8 +218,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/Assert-MockCalled](https://pester.dev/docs/v5/commands/Assert-MockCalled) +- [https://pester.dev/docs/v5/commands/Assert-MockCalled](https://pester.dev/docs/v5/commands/Assert-MockCalled) ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Assert-VerifiableMock.mdx b/versioned_docs/version-v5/commands/Assert-VerifiableMock.mdx index e28b3062..776fdf94 100644 --- a/versioned_docs/version-v5/commands/Assert-VerifiableMock.mdx +++ b/versioned_docs/version-v5/commands/Assert-VerifiableMock.mdx @@ -1,7 +1,7 @@ --- id: Assert-VerifiableMock title: Assert-VerifiableMock -description: Help page for the PowerShell Pester "Assert-VerifiableMock" command +description: Help for Pester command 'Assert-VerifiableMock'. Checks if all verifiable Mocks has been called at least once. keywords: - PowerShell - Pester @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -26,7 +26,7 @@ USE Should -InvokeVerifiable INSTEAD. ## SYNTAX ```powershell -Assert-VerifiableMock [] +Assert-VerifiableMock ``` ## DESCRIPTION @@ -47,7 +47,10 @@ PS C:\> {{ Add example code here }} ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -57,8 +60,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/Assert-VerifiableMock](https://pester.dev/docs/v5/commands/Assert-VerifiableMock) +- [https://pester.dev/docs/v5/commands/Assert-VerifiableMock](https://pester.dev/docs/v5/commands/Assert-VerifiableMock) ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/BeforeAll.mdx b/versioned_docs/version-v5/commands/BeforeAll.mdx index 4b4c5389..d3577124 100644 --- a/versioned_docs/version-v5/commands/BeforeAll.mdx +++ b/versioned_docs/version-v5/commands/BeforeAll.mdx @@ -1,7 +1,7 @@ --- id: BeforeAll title: BeforeAll -description: Help page for the PowerShell Pester "BeforeAll" command +description: Help for Pester command 'BeforeAll'. Defines a series of steps to perform at the beginning of the current container, Context or Describe block. keywords: - PowerShell - Pester @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -24,7 +24,7 @@ Context or Describe block. ## SYNTAX ```powershell -BeforeAll [-Scriptblock] [] +BeforeAll [-Scriptblock] ``` ## DESCRIPTION @@ -87,20 +87,28 @@ the results in separate tests. A scriptblock with steps to be executed during setup. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -110,10 +118,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/BeforeAll](https://pester.dev/docs/v5/commands/BeforeAll) - -[https://pester.dev/docs/v5/usage/setup-and-teardown](https://pester.dev/docs/v5/usage/setup-and-teardown) +- [https://pester.dev/docs/v5/commands/BeforeAll](https://pester.dev/docs/v5/commands/BeforeAll) +- [https://pester.dev/docs/v5/usage/setup-and-teardown](https://pester.dev/docs/v5/usage/setup-and-teardown) ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/BeforeDiscovery.mdx b/versioned_docs/version-v5/commands/BeforeDiscovery.mdx index 6136a848..42db4814 100644 --- a/versioned_docs/version-v5/commands/BeforeDiscovery.mdx +++ b/versioned_docs/version-v5/commands/BeforeDiscovery.mdx @@ -1,7 +1,7 @@ --- id: BeforeDiscovery title: BeforeDiscovery -description: Help page for the PowerShell Pester "BeforeDiscovery" command +description: Help for Pester command 'BeforeDiscovery'. Runs setup code that is used during Discovery phase. keywords: - PowerShell - Pester @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -23,7 +23,7 @@ Runs setup code that is used during Discovery phase. ## SYNTAX ```powershell -BeforeDiscovery [-ScriptBlock] [] +BeforeDiscovery [-ScriptBlock] ``` ## DESCRIPTION @@ -65,20 +65,28 @@ dynamically create a Describe-block and tests for each file found. The ScriptBlock to run. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -88,10 +96,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/BeforeDiscovery](https://pester.dev/docs/v5/commands/BeforeDiscovery) - -[https://pester.dev/docs/v5/usage/data-driven-tests](https://pester.dev/docs/v5/usage/data-driven-tests) +- [https://pester.dev/docs/v5/commands/BeforeDiscovery](https://pester.dev/docs/v5/commands/BeforeDiscovery) +- [https://pester.dev/docs/v5/usage/data-driven-tests](https://pester.dev/docs/v5/usage/data-driven-tests) ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/BeforeEach.mdx b/versioned_docs/version-v5/commands/BeforeEach.mdx index 254d3ce4..6d37f92e 100644 --- a/versioned_docs/version-v5/commands/BeforeEach.mdx +++ b/versioned_docs/version-v5/commands/BeforeEach.mdx @@ -1,7 +1,7 @@ --- id: BeforeEach title: BeforeEach -description: Help page for the PowerShell Pester "BeforeEach" command +description: Help for Pester command 'BeforeEach'. Defines a series of steps to perform at the beginning of every It block within the current Context or Describe block. keywords: - PowerShell - Pester @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -24,7 +24,7 @@ the current Context or Describe block. ## SYNTAX ```powershell -BeforeEach [-Scriptblock] [] +BeforeEach [-Scriptblock] ``` ## DESCRIPTION @@ -72,20 +72,28 @@ The example uses BeforeEach to ensure a clean sample-file is used for each test. A scriptblock with steps to be executed during setup. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -95,10 +103,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/BeforeEach](https://pester.dev/docs/v5/commands/BeforeEach) - -[https://pester.dev/docs/v5/usage/setup-and-teardown](https://pester.dev/docs/v5/usage/setup-and-teardown) +- [https://pester.dev/docs/v5/commands/BeforeEach](https://pester.dev/docs/v5/commands/BeforeEach) +- [https://pester.dev/docs/v5/usage/setup-and-teardown](https://pester.dev/docs/v5/usage/setup-and-teardown) ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Context.mdx b/versioned_docs/version-v5/commands/Context.mdx index 267406a7..461dc243 100644 --- a/versioned_docs/version-v5/commands/Context.mdx +++ b/versioned_docs/version-v5/commands/Context.mdx @@ -1,7 +1,7 @@ --- id: Context title: Context -description: Help page for the PowerShell Pester "Context" command +description: Help for Pester command 'Context'. Provides logical grouping of It blocks within a single Describe block. keywords: - PowerShell - Pester @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -23,8 +23,7 @@ Provides logical grouping of It blocks within a single Describe block. ## SYNTAX ```powershell -Context [-Name] [-Tag ] [[-Fixture] ] [-Skip] [-ForEach ] - [] +Context [-Name] [[-Fixture] ] [-Tag ] [-Skip] [-ForEach ] ``` ## DESCRIPTION @@ -69,58 +68,74 @@ Example of how to use Context for grouping different tests ## PARAMETERS -### -Name +### -Fixture -The name of the Context. -This is a phrase describing a set of tests within a describe. +Script that is executed. +This may include setup specific to the context +and one or more It blocks that validate the expected outcomes. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Tag +### -ForEach -Optional parameter containing an array of strings. -When calling Invoke-Pester, -it is possible to specify a -Tag parameter which will only execute Context blocks -containing the same Tag. +Allows data driven tests to be written. +Takes an array of data and generates one block for each item in the array, and makes the item +available as $_ in all child blocks. +When the array is an array of hashtables, it additionally +defines each key in the hashtable as variable. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: Tags - -Required: False -Position: Named -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Fixture +### -Name -Script that is executed. -This may include setup specific to the context -and one or more It blocks that validate the expected outcomes. +The name of the Context. +This is a phrase describing a set of tests within a describe. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Skip @@ -130,40 +145,53 @@ This is preferable to temporarily commenting out a block, because it remains listed in the output. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ForEach +### -Tag -Allows data driven tests to be written. -Takes an array of data and generates one block for each item in the array, and makes the item -available as $_ in all child blocks. -When the array is an array of hashtables, it additionally -defines each key in the hashtable as variable. +Optional parameter containing an array of strings. +When calling Invoke-Pester, +it is possible to specify a -Tag parameter which will only execute Context blocks +containing the same Tag. ```yaml -Type: Object -Parameter Sets: (All) +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +- Tags +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -173,14 +201,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/Context](https://pester.dev/docs/v5/commands/Context) - -[https://pester.dev/docs/v5/usage/test-file-structure](https://pester.dev/docs/v5/usage/test-file-structure) - -[https://pester.dev/docs/v5/usage/mocking](https://pester.dev/docs/v5/usage/mocking) - -[https://pester.dev/docs/v5/usage/testdrive](https://pester.dev/docs/v5/usage/testdrive) +- [https://pester.dev/docs/v5/commands/Context](https://pester.dev/docs/v5/commands/Context) +- [https://pester.dev/docs/v5/usage/test-file-structure](https://pester.dev/docs/v5/usage/test-file-structure) +- [https://pester.dev/docs/v5/usage/mocking](https://pester.dev/docs/v5/usage/mocking) +- [https://pester.dev/docs/v5/usage/testdrive](https://pester.dev/docs/v5/usage/testdrive) ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/ConvertTo-JUnitReport.mdx b/versioned_docs/version-v5/commands/ConvertTo-JUnitReport.mdx index 9f80e789..49f64de9 100644 --- a/versioned_docs/version-v5/commands/ConvertTo-JUnitReport.mdx +++ b/versioned_docs/version-v5/commands/ConvertTo-JUnitReport.mdx @@ -1,7 +1,7 @@ --- id: ConvertTo-JUnitReport title: ConvertTo-JUnitReport -description: Help page for the PowerShell Pester "ConvertTo-JUnitReport" command +description: Help for Pester command 'ConvertTo-JUnitReport'. Converts a Pester result-object to an JUnit-compatible XML report keywords: - PowerShell - Pester @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -23,7 +23,7 @@ Converts a Pester result-object to an JUnit-compatible XML report ## SYNTAX ```powershell -ConvertTo-JUnitReport [-Result] [-AsString] [] +ConvertTo-JUnitReport [-Result] [-AsString] ``` ## DESCRIPTION @@ -66,56 +66,70 @@ The returned object is a string. ## PARAMETERS -### -Result +### -AsString -Result object from a Pester-run. -This can be retrieved using Invoke-Pester --Passthru or by using the Run.PassThru configuration-option. +Returns the XML-report as a string. ```yaml -Type: Run -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -AsString +### -Result -Returns the XML-report as a string. +Result object from a Pester-run. +This can be retrieved using Invoke-Pester +-Passthru or by using the Run.PassThru configuration-option. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: Pester.Run +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### Pester.Run + ## OUTPUTS ## NOTES ## RELATED LINKS -[https://pester.dev/docs/v5/commands/ConvertTo-JUnitReport](https://pester.dev/docs/v5/commands/ConvertTo-JUnitReport) - -[https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) +- [https://pester.dev/docs/v5/commands/ConvertTo-JUnitReport](https://pester.dev/docs/v5/commands/ConvertTo-JUnitReport) +- [https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/ConvertTo-NUnitReport.mdx b/versioned_docs/version-v5/commands/ConvertTo-NUnitReport.mdx index a3ea5c13..a6c64ef4 100644 --- a/versioned_docs/version-v5/commands/ConvertTo-NUnitReport.mdx +++ b/versioned_docs/version-v5/commands/ConvertTo-NUnitReport.mdx @@ -1,7 +1,7 @@ --- id: ConvertTo-NUnitReport title: ConvertTo-NUnitReport -description: Help page for the PowerShell Pester "ConvertTo-NUnitReport" command +description: Help for Pester command 'ConvertTo-NUnitReport'. Converts a Pester result-object to an NUnit 2.5 or 3-compatible XML-report keywords: - PowerShell - Pester @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -23,7 +23,7 @@ Converts a Pester result-object to an NUnit 2.5 or 3-compatible XML-report ## SYNTAX ```powershell -ConvertTo-NUnitReport [-Result] [-AsString] [[-Format] ] [] +ConvertTo-NUnitReport [-Result] [[-Format] ] [-AsString] ``` ## DESCRIPTION @@ -77,72 +77,91 @@ The returned object is a string. ## PARAMETERS -### -Result +### -AsString -Result object from a Pester-run. -This can be retrieved using Invoke-Pester --Passthru or by using the Run.PassThru configuration-option. +Returns the XML-report as a string. ```yaml -Type: Run -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -AsString +### -Format -Returns the XML-report as a string. +Specifies the NUnit-schema to be used. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: NUnit2.5 +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Format +### -Result -Specifies the NUnit-schema to be used. +Result object from a Pester-run. +This can be retrieved using Invoke-Pester +-Passthru or by using the Run.PassThru configuration-option. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: NUnit2.5 -Accept pipeline input: False -Accept wildcard characters: False +Type: Pester.Run +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### Pester.Run + ## OUTPUTS ## NOTES ## RELATED LINKS -[https://pester.dev/docs/v5/commands/ConvertTo-NUnitReport](https://pester.dev/docs/v5/commands/ConvertTo-NUnitReport) - -[https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) +- [https://pester.dev/docs/v5/commands/ConvertTo-NUnitReport](https://pester.dev/docs/v5/commands/ConvertTo-NUnitReport) +- [https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/ConvertTo-Pester4Result.mdx b/versioned_docs/version-v5/commands/ConvertTo-Pester4Result.mdx index 2e69c048..aa5d83db 100644 --- a/versioned_docs/version-v5/commands/ConvertTo-Pester4Result.mdx +++ b/versioned_docs/version-v5/commands/ConvertTo-Pester4Result.mdx @@ -1,7 +1,7 @@ --- id: ConvertTo-Pester4Result title: ConvertTo-Pester4Result -description: Help page for the PowerShell Pester "ConvertTo-Pester4Result" command +description: Help for Pester command 'ConvertTo-Pester4Result'. Converts a Pester 5 result-object to an Pester 4-compatible object keywords: - PowerShell - Pester @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -23,7 +23,7 @@ Converts a Pester 5 result-object to an Pester 4-compatible object ## SYNTAX ```powershell -ConvertTo-Pester4Result [-PesterResult] [] +ConvertTo-Pester4Result [-PesterResult] ``` ## DESCRIPTION @@ -57,33 +57,42 @@ This can be retrieved using Invoke-Pester -Passthru or by using the Run.PassThru configuration-option. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES ## RELATED LINKS -[https://pester.dev/docs/v5/commands/ConvertTo-Pester4Result](https://pester.dev/docs/v5/commands/ConvertTo-Pester4Result) - -[https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) +- [https://pester.dev/docs/v5/commands/ConvertTo-Pester4Result](https://pester.dev/docs/v5/commands/ConvertTo-Pester4Result) +- [https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Describe.mdx b/versioned_docs/version-v5/commands/Describe.mdx index ed9f6da9..ef9e43b4 100644 --- a/versioned_docs/version-v5/commands/Describe.mdx +++ b/versioned_docs/version-v5/commands/Describe.mdx @@ -1,7 +1,7 @@ --- id: Describe title: Describe -description: Help page for the PowerShell Pester "Describe" command +description: Help for Pester command 'Describe'. Creates a logical group of tests. keywords: - PowerShell - Pester @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -23,8 +23,7 @@ Creates a logical group of tests. ## SYNTAX ```powershell -Describe [-Name] [-Tag ] [[-Fixture] ] [-Skip] [-ForEach ] - [] +Describe [-Name] [[-Fixture] ] [-Tag ] [-Skip] [-ForEach ] ``` ## DESCRIPTION @@ -32,8 +31,8 @@ Describe [-Name] [-Tag ] [[-Fixture] ] [-Skip] [ Creates a logical group of tests. All Mocks, TestDrive and TestRegistry contents defined within a Describe block are scoped to that Describe; they -will no longer be present when the Describe block exits. -A Describe +will no longer be present when the Describe block exits. + A Describe block may contain any number of Context and It blocks. ## EXAMPLES @@ -74,63 +73,79 @@ Using Describe to group tests logically at the root of the script/container ## PARAMETERS -### -Name +### -Fixture -The name of the test group. -This is often an expressive phrase describing -the scenario being tested. +The actual test script. +If you are following the AAA pattern (Arrange-Act-Assert), +this typically holds the arrange and act sections. +The Asserts will also lie +in this block but are typically nested each in its own It block. +Assertions are +typically performed by the Should command within the It blocks. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Tag +### -ForEach -Optional parameter containing an array of strings. -When calling Invoke-Pester, -it is possible to specify a -Tag parameter which will only execute Describe blocks -containing the same Tag. +Allows data driven tests to be written. +Takes an array of data and generates one block for each item in the array, and makes the item +available as $_ in all child blocks. +When the array is an array of hashtables, it additionally +defines each key in the hashtable as variable. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: Tags - -Required: False -Position: Named -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Fixture +### -Name -The actual test script. -If you are following the AAA pattern (Arrange-Act-Assert), -this typically holds the arrange and act sections. -The Asserts will also lie -in this block but are typically nested each in its own It block. -Assertions are -typically performed by the Should command within the It blocks. +The name of the test group. +This is often an expressive phrase describing +the scenario being tested. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Skip @@ -140,40 +155,53 @@ This is preferable to temporarily commenting out a block, because it remains listed in the output. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ForEach +### -Tag -Allows data driven tests to be written. -Takes an array of data and generates one block for each item in the array, and makes the item -available as $_ in all child blocks. -When the array is an array of hashtables, it additionally -defines each key in the hashtable as variable. +Optional parameter containing an array of strings. +When calling Invoke-Pester, +it is possible to specify a -Tag parameter which will only execute Describe blocks +containing the same Tag. ```yaml -Type: Object -Parameter Sets: (All) +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +- Tags +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -183,14 +211,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/Describe](https://pester.dev/docs/v5/commands/Describe) - -[https://pester.dev/docs/v5/usage/test-file-structure](https://pester.dev/docs/v5/usage/test-file-structure) - -[https://pester.dev/docs/v5/usage/mocking](https://pester.dev/docs/v5/usage/mocking) - -[https://pester.dev/docs/v5/usage/testdrive](https://pester.dev/docs/v5/usage/testdrive) +- [https://pester.dev/docs/v5/commands/Describe](https://pester.dev/docs/v5/commands/Describe) +- [https://pester.dev/docs/v5/usage/test-file-structure](https://pester.dev/docs/v5/usage/test-file-structure) +- [https://pester.dev/docs/v5/usage/mocking](https://pester.dev/docs/v5/usage/mocking) +- [https://pester.dev/docs/v5/usage/testdrive](https://pester.dev/docs/v5/usage/testdrive) ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Export-JUnitReport.mdx b/versioned_docs/version-v5/commands/Export-JUnitReport.mdx index 90cd21c2..db0e5e2a 100644 --- a/versioned_docs/version-v5/commands/Export-JUnitReport.mdx +++ b/versioned_docs/version-v5/commands/Export-JUnitReport.mdx @@ -1,7 +1,7 @@ --- id: Export-JUnitReport title: Export-JUnitReport -description: Help page for the PowerShell Pester "Export-JUnitReport" command +description: Help for Pester command 'Export-JUnitReport'. Exports a Pester result-object to an JUnit-compatible XML-report keywords: - PowerShell - Pester @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -23,7 +23,7 @@ Exports a Pester result-object to an JUnit-compatible XML-report ## SYNTAX ```powershell -Export-JUnitReport [-Result] [-Path] [] +Export-JUnitReport [-Result] [-Path] ``` ## DESCRIPTION @@ -53,56 +53,70 @@ exports it as an JUnit 4-compatible XML-report. ## PARAMETERS -### -Result +### -Path -Result object from a Pester-run. -This can be retrieved using Invoke-Pester --Passthru or by using the Run.PassThru configuration-option. +The path where the XML-report should be saved. ```yaml -Type: Run -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Path +### -Result -The path where the XML-report should be saved. +Result object from a Pester-run. +This can be retrieved using Invoke-Pester +-Passthru or by using the Run.PassThru configuration-option. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: Pester.Run +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### Pester.Run + ## OUTPUTS ## NOTES ## RELATED LINKS -[https://pester.dev/docs/v5/commands/Export-JUnitReport](https://pester.dev/docs/v5/commands/Export-JUnitReport) - -[https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) +- [https://pester.dev/docs/v5/commands/Export-JUnitReport](https://pester.dev/docs/v5/commands/Export-JUnitReport) +- [https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Export-NUnitReport.mdx b/versioned_docs/version-v5/commands/Export-NUnitReport.mdx index 1600c4f4..49398458 100644 --- a/versioned_docs/version-v5/commands/Export-NUnitReport.mdx +++ b/versioned_docs/version-v5/commands/Export-NUnitReport.mdx @@ -1,7 +1,7 @@ --- id: Export-NUnitReport title: Export-NUnitReport -description: Help page for the PowerShell Pester "Export-NUnitReport" command +description: Help for Pester command 'Export-NUnitReport'. Exports a Pester result-object to an NUnit-compatible XML-report keywords: - PowerShell - Pester @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -23,7 +23,7 @@ Exports a Pester result-object to an NUnit-compatible XML-report ## SYNTAX ```powershell -Export-NUnitReport [-Result] [-Path] [[-Format] ] [] +Export-NUnitReport [-Result] [-Path] [[-Format] ] ``` ## DESCRIPTION @@ -53,22 +53,25 @@ exports it as an NUnit 2.5-compatible XML-report. ## PARAMETERS -### -Result +### -Format -Result object from a Pester-run. -This can be retrieved using Invoke-Pester --Passthru or by using the Run.PassThru configuration-option. +Specifies the NUnit-schema to be used. ```yaml -Type: Run -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.String +DefaultValue: NUnit2.5 +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Path @@ -76,49 +79,65 @@ Accept wildcard characters: False The path where the XML-report should be saved. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Format +### -Result -Specifies the NUnit-schema to be used. +Result object from a Pester-run. +This can be retrieved using Invoke-Pester +-Passthru or by using the Run.PassThru configuration-option. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: NUnit2.5 -Accept pipeline input: False -Accept wildcard characters: False +Type: Pester.Run +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### Pester.Run + ## OUTPUTS ## NOTES ## RELATED LINKS -[https://pester.dev/docs/v5/commands/Export-NUnitReport](https://pester.dev/docs/v5/commands/Export-NUnitReport) - -[https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) +- [https://pester.dev/docs/v5/commands/Export-NUnitReport](https://pester.dev/docs/v5/commands/Export-NUnitReport) +- [https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Get-ShouldOperator.mdx b/versioned_docs/version-v5/commands/Get-ShouldOperator.mdx index 0de3383e..34bb4a67 100644 --- a/versioned_docs/version-v5/commands/Get-ShouldOperator.mdx +++ b/versioned_docs/version-v5/commands/Get-ShouldOperator.mdx @@ -1,7 +1,7 @@ --- id: Get-ShouldOperator title: Get-ShouldOperator -description: Help page for the PowerShell Pester "Get-ShouldOperator" command +description: Help for Pester command 'Get-ShouldOperator'. Display the assertion operators available for use with Should. keywords: - PowerShell - Pester @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -23,7 +23,7 @@ Display the assertion operators available for use with Should. ## SYNTAX ```powershell -Get-ShouldOperator [-Name ] [] +Get-ShouldOperator [[-Name] ] ``` ## DESCRIPTION @@ -60,20 +60,28 @@ Return help examples for the Be assertion operator. Name or alias of operator ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -88,10 +96,9 @@ standard PowerShell discovery patterns (like `Get-Help Should -Parameter *`). ## RELATED LINKS -[https://pester.dev/docs/v5/commands/Get-ShouldOperator](https://pester.dev/docs/v5/commands/Get-ShouldOperator) - -[https://pester.dev/docs/v5/commands/Should](https://pester.dev/docs/v5/commands/Should) +- [https://pester.dev/docs/v5/commands/Get-ShouldOperator](https://pester.dev/docs/v5/commands/Get-ShouldOperator) +- [https://pester.dev/docs/v5/commands/Should](https://pester.dev/docs/v5/commands/Should) ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/InModuleScope.mdx b/versioned_docs/version-v5/commands/InModuleScope.mdx index f0cd06f8..8021c2b8 100644 --- a/versioned_docs/version-v5/commands/InModuleScope.mdx +++ b/versioned_docs/version-v5/commands/InModuleScope.mdx @@ -1,7 +1,7 @@ --- id: InModuleScope title: InModuleScope -description: Help page for the PowerShell Pester "InModuleScope" command +description: Help for Pester command 'InModuleScope'. Allows you to execute parts of a test script within the scope of a PowerShell script or manifest module. keywords: - PowerShell - Pester @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -24,8 +24,8 @@ scope of a PowerShell script or manifest module. ## SYNTAX ```powershell -InModuleScope [-ModuleName] [-ScriptBlock] [[-Parameters] ] - [[-ArgumentList] ] [] +InModuleScope [-ModuleName] [-ScriptBlock] [[-Parameters] ] + [[-ArgumentList] ] ``` ## DESCRIPTION @@ -122,39 +122,49 @@ them in using `-Parameters` or `-ArgumentList`. ## PARAMETERS -### -ModuleName +### -ArgumentList -The name of the module into which the test code should be -injected. -This module must already be loaded into the current -PowerShell session. +A optional list of arguments to be passed to the scriptblock. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object[] +DefaultValue: '@()' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ScriptBlock +### -ModuleName -The code to be executed within the script or manifest module. +The name of the module into which the test code should be +injected. +This module must already be loaded into the current +PowerShell session. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: True -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Parameters @@ -163,36 +173,49 @@ A optional hashtable of parameters to be passed to the scriptblock. Parameters are automatically made available as variables in the scriptblock. ```yaml -Type: Hashtable -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: @{} -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Collections.Hashtable +DefaultValue: '@{}' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -ArgumentList +### -ScriptBlock -A optional list of arguments to be passed to the scriptblock. +The code to be executed within the script or manifest module. ```yaml -Type: Object[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -202,8 +225,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/InModuleScope](https://pester.dev/docs/v5/commands/InModuleScope) +- [https://pester.dev/docs/v5/commands/InModuleScope](https://pester.dev/docs/v5/commands/InModuleScope) ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Invoke-Pester.mdx b/versioned_docs/version-v5/commands/Invoke-Pester.mdx index 04cfb476..7383648c 100644 --- a/versioned_docs/version-v5/commands/Invoke-Pester.mdx +++ b/versioned_docs/version-v5/commands/Invoke-Pester.mdx @@ -1,7 +1,7 @@ --- id: Invoke-Pester title: Invoke-Pester -description: Help page for the PowerShell Pester "Invoke-Pester" command +description: Help for Pester command 'Invoke-Pester'. Runs Pester tests keywords: - PowerShell - Pester @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -25,25 +25,25 @@ Runs Pester tests ### Simple (Default) ```powershell -Invoke-Pester [[-Path] ] [-ExcludePath ] [-TagFilter ] - [-ExcludeTagFilter ] [-FullNameFilter ] [-CI] [-Output ] [-PassThru] - [-Container ] [] +Invoke-Pester [[-Path] ] [-ExcludePath ] [-TagFilter ] + [-ExcludeTagFilter ] [-FullNameFilter ] [-CI] [-Output ] [-PassThru] + [-Container ] ``` ### Legacy ```powershell -Invoke-Pester [[-Path] ] [-TagFilter ] [-ExcludeTagFilter ] - [-FullNameFilter ] [-PassThru] [-EnableExit] [-CodeCoverage ] - [-CodeCoverageOutputFile ] [-CodeCoverageOutputFileEncoding ] - [-CodeCoverageOutputFileFormat ] [-Strict] [-OutputFile ] [-OutputFormat ] [-Quiet] - [-PesterOption ] [-Show ] [] +Invoke-Pester [[-Path] ] [[-FullNameFilter] ] [-EnableExit] + [[-TagFilter] ] [-ExcludeTagFilter ] [-PassThru] [-CodeCoverage ] + [-CodeCoverageOutputFile ] [-CodeCoverageOutputFileEncoding ] + [-CodeCoverageOutputFileFormat ] [-Strict] [-OutputFile ] [-OutputFormat ] + [-Quiet] [-PesterOption ] [-Show ] ``` ### Advanced ```powershell -Invoke-Pester [-Configuration ] [] +Invoke-Pester [-Configuration ] ``` ## DESCRIPTION @@ -138,95 +138,6 @@ to see other testresult options like output path and format and their default v ## PARAMETERS -### -Path - -Aliases Script -Specifies one or more paths to files containing tests. -The value is a path\file -name or name pattern. -Wildcards are permitted. - -```yaml -Type: String[] -Parameter Sets: Simple, Legacy -Aliases: Script - -Required: False -Position: 1 -Default value: . -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ExcludePath - -(Deprecated v4) -Replace with ConfigurationProperty Run.ExcludePath - -```yaml -Type: String[] -Parameter Sets: Simple -Aliases: - -Required: False -Position: Named -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -TagFilter - -(Deprecated v4) -Aliases Tag, Tags -Replace with ConfigurationProperty Filter.Tag - -```yaml -Type: String[] -Parameter Sets: Simple, Legacy -Aliases: Tags, Tag - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ExcludeTagFilter - -(Deprecated v4) -Replace with ConfigurationProperty Filter.ExcludeTag - -```yaml -Type: String[] -Parameter Sets: Simple, Legacy -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -FullNameFilter - -(Deprecated v4) -Replace with ConfigurationProperty Filter.FullName - -```yaml -Type: String[] -Parameter Sets: Simple, Legacy -Aliases: Name - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -CI (Introduced v5) @@ -241,113 +152,20 @@ To also enable CodeCoverage use this configuration option: CodeCoverage.Enabled = $true ```yaml -Type: SwitchParameter -Parameter Sets: Simple -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Output - -(Deprecated v4) -Replace with ConfigurationProperty Output.Verbosity -Supports Diagnostic, Detailed, Normal, Minimal, None - -Default value is: Normal - -```yaml -Type: String -Parameter Sets: Simple -Aliases: - -Required: False -Position: Named -Default value: Normal -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PassThru - -Replace with ConfigurationProperty Run.PassThru -Returns a custom object (PSCustomObject) that contains the test results. -By default, Invoke-Pester writes to the host program, not to the output stream (stdout). -If you try to save the result in a variable, the variable is empty unless you -use the PassThru parameter. -To suppress the host output, use the Show parameter set to None. - -```yaml -Type: SwitchParameter -Parameter Sets: Simple, Legacy -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Container - -Specifies one or more ContainerInfo-objects that define containers with tests. -ContainerInfo-objects are generated using New-PesterContainer. -Useful for -scenarios where data-driven test are generated, e.g. -parametrized test files. - -```yaml -Type: ContainerInfo[] -Parameter Sets: Simple -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Configuration - -[PesterConfiguration] object for Advanced Configuration created using `New-PesterConfiguration`. -For help on each option see about_PesterConfiguration or inspect the object. - -```yaml -Type: PesterConfiguration -Parameter Sets: Advanced -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EnableExit - -(Deprecated v4) -Replace with ConfigurationProperty Run.Exit -Will cause Invoke-Pester to exit with a exit code equal to the number of failed -tests once all tests have been run. -Use this to "fail" a build when any tests fail. - -```yaml -Type: SwitchParameter -Parameter Sets: Legacy -Aliases: - -Required: False -Position: 3 -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CodeCoverage @@ -403,15 +221,20 @@ Default is line 1. Default is the last line of the script. ```yaml -Type: Object[] -Parameter Sets: Legacy -Aliases: - -Required: False -Position: Named -Default value: @() -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object[] +DefaultValue: '@()' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CodeCoverageOutputFile @@ -424,15 +247,20 @@ a required extension (usually the xml). If this path is not provided, no file will be generated. ```yaml -Type: String -Parameter Sets: Legacy -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CodeCoverageOutputFileEncoding @@ -443,15 +271,20 @@ Sets the output encoding of CodeCoverageOutputFileFormat Default is utf8 ```yaml -Type: String -Parameter Sets: Legacy -Aliases: - -Required: False -Position: Named -Default value: Utf8 -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: utf8 +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CodeCoverageOutputFileFormat @@ -467,34 +300,196 @@ The ReportGenerator tool can be used to consolidate multiple reports and provide https://github.com/danielpalme/ReportGenerator ```yaml -Type: String -Parameter Sets: Legacy -Aliases: +Type: System.String +DefaultValue: JaCoCo +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Configuration + +[PesterConfiguration] object for Advanced Configuration created using `New-PesterConfiguration`. +For help on each option see about_PesterConfiguration or inspect the object. -Required: False -Position: Named -Default value: JaCoCo -Accept pipeline input: False -Accept wildcard characters: False +```yaml +Type: PesterConfiguration +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Advanced + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Strict +### -Container + +Specifies one or more ContainerInfo-objects that define containers with tests. +ContainerInfo-objects are generated using New-PesterContainer. +Useful for +scenarios where data-driven test are generated, e.g. +parametrized test files. + +```yaml +Type: Pester.ContainerInfo[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -EnableExit (Deprecated v4) -Makes Pending and Skipped tests to Failed tests. -Useful for continuous -integration where you need to make sure all tests passed. +Replace with ConfigurationProperty Run.Exit +Will cause Invoke-Pester to exit with a exit code equal to the number of failed +tests once all tests have been run. +Use this to "fail" a build when any tests fail. + +```yaml +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -ExcludePath + +(Deprecated v4) +Replace with ConfigurationProperty Run.ExcludePath ```yaml -Type: SwitchParameter -Parameter Sets: Legacy +Type: System.String[] +DefaultValue: '@()' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -ExcludeTagFilter + +(Deprecated v4) +Replace with ConfigurationProperty Filter.ExcludeTag + +```yaml +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -FullNameFilter + +(Deprecated v4) +Replace with ConfigurationProperty Filter.FullName + +```yaml +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false Aliases: +- Name +ParameterSets: +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Legacy + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Output + +(Deprecated v4) +Replace with ConfigurationProperty Output.Verbosity +Supports Diagnostic, Detailed, Normal, Minimal, None -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Default value is: Normal + +```yaml +Type: System.String +DefaultValue: Normal +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -OutputFile @@ -507,15 +502,20 @@ the xml extension. If this path is not provided, no log will be generated. ```yaml -Type: String -Parameter Sets: Legacy -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -OutputFormat @@ -526,39 +526,84 @@ The format of output. Currently NUnitXml and JUnitXml is supported. ```yaml -Type: String -Parameter Sets: Legacy -Aliases: +Type: System.String +DefaultValue: NUnitXml +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` -Required: False -Position: Named -Default value: NUnitXml -Accept pipeline input: False -Accept wildcard characters: False +### -PassThru + +Replace with ConfigurationProperty Run.PassThru +Returns a custom object (PSCustomObject) that contains the test results. +By default, Invoke-Pester writes to the host program, not to the output stream (stdout). +If you try to save the result in a variable, the variable is empty unless you +use the PassThru parameter. +To suppress the host output, use the Show parameter set to None. + +```yaml +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Quiet +### -Path -(Deprecated v4) -The parameter Quiet is deprecated since Pester v4.0 and will be deleted -in the next major version of Pester. -Please use the parameter Show -with value 'None' instead. -The parameter Quiet suppresses the output that Pester writes to the host program, -including the result summary and CodeCoverage output. -This parameter does not affect the PassThru custom object or the XML output that -is written when you use the Output parameters. +Aliases Script +Specifies one or more paths to files containing tests. +The value is a path\file +name or name pattern. +Wildcards are permitted. ```yaml -Type: SwitchParameter -Parameter Sets: Legacy +Type: System.String[] +DefaultValue: . +SupportsWildcards: false Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +- Script +ParameterSets: +- Name: Legacy + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Simple + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -PesterOption @@ -574,15 +619,49 @@ in which the keys are option names and the values are option values. For more information on the options available, see the help for New-PesterOption. ```yaml -Type: Object -Parameter Sets: Legacy -Aliases: +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Quiet + +(Deprecated v4) +The parameter Quiet is deprecated since Pester v4.0 and will be deleted +in the next major version of Pester. +Please use the parameter Show +with value 'None' instead. +The parameter Quiet suppresses the output that Pester writes to the host program, +including the result summary and CodeCoverage output. +This parameter does not affect the PassThru custom object or the XML output that +is written when you use the Output parameters. -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +```yaml +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Show @@ -615,21 +694,83 @@ This parameter does not affect the PassThru custom object or the XML output that is written when you use the Output parameters. ```yaml -Type: OutputTypes -Parameter Sets: Legacy -Aliases: -Accepted values: None, Default, Passed, Failed, Pending, Skipped, Inconclusive, Describe, Context, Summary, Header, Fails, All +Type: Pester.OutputTypes +DefaultValue: All +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` -Required: False -Position: Named -Default value: All -Accept pipeline input: False -Accept wildcard characters: False +### -Strict + +(Deprecated v4) +Makes Pending and Skipped tests to Failed tests. +Useful for continuous +integration where you need to make sure all tests passed. + +```yaml +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Legacy + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -TagFilter + +(Deprecated v4) +Aliases Tag, Tags +Replace with ConfigurationProperty Filter.Tag + +```yaml +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: +- Tags +- Tag +ParameterSets: +- Name: Legacy + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Simple + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -639,10 +780,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) - -[https://pester.dev/docs/v5/quick-start](https://pester.dev/docs/v5/quick-start) +- [https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) +- [https://pester.dev/docs/v5/quick-start](https://pester.dev/docs/v5/quick-start) ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/It.mdx b/versioned_docs/version-v5/commands/It.mdx index fe774f05..4ec745d9 100644 --- a/versioned_docs/version-v5/commands/It.mdx +++ b/versioned_docs/version-v5/commands/It.mdx @@ -1,7 +1,7 @@ --- id: It title: It -description: Help page for the PowerShell Pester "It" command +description: Help for Pester command 'It'. Validates the results of a test inside of a Describe block. keywords: - PowerShell - Pester @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -25,21 +25,19 @@ Validates the results of a test inside of a Describe block. ### Normal (Default) ```powershell -It [-Name] [[-Test] ] [-ForEach ] [-Tag ] [] +It [-Name] [[-Test] ] [-ForEach ] [-Tag ] ``` ### Pending ```powershell -It [-Name] [[-Test] ] [-ForEach ] [-Tag ] [-Pending] - [] +It [-Name] [[-Test] ] [-ForEach ] [-Tag ] [-Pending] ``` ### Skip ```powershell -It [-Name] [[-Test] ] [-ForEach ] [-Tag ] [-Skip] - [] +It [-Name] [[-Test] ] [-ForEach ] [-Tag ] [-Skip] ``` ## DESCRIPTION @@ -127,79 +125,53 @@ current hashtable are made available as variables inside It. ## PARAMETERS -### -Name - -An expressive phrase describing the expected test outcome. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Test - -The script block that should throw an exception if the -expectation of the test is not met.If you are following the -AAA pattern (Arrange-Act-Assert), this typically holds the -Assert. - -```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -ForEach (Formerly called TestCases.) Optional array of hashtable (or any IDictionary) objects. If this parameter is used, Pester will call the test script block once for each table in -the ForEach array, splatting the dictionary to the test script block as input. -If you want +the ForEach array, splatting the dictionary to the test script block as input. + If you want the name of the test to appear differently for each test case, you can embed tokens into the Name parameter with the syntax 'Adds numbers <A> and <B>' (assuming you have keys named A and B in your ForEach hashtables.) ```yaml -Type: Object[] -Parameter Sets: (All) -Aliases: TestCases - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object[] +DefaultValue: '' +SupportsWildcards: false +Aliases: +- TestCases +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Tag +### -Name -Optional parameter containing an array of strings. -When calling Invoke-Pester, -it is possible to include or exclude tests containing the same Tag. +An expressive phrase describing the expected test outcome. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Pending @@ -211,15 +183,20 @@ An empty test, that is a test that contains nothing except whitespace or comments is marked as Pending by default. ```yaml -Type: SwitchParameter -Parameter Sets: Pending -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Pending + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Skip @@ -229,20 +206,75 @@ This is preferable to temporarily commenting out a test, because the test remains listed in the output. ```yaml -Type: SwitchParameter -Parameter Sets: Skip -Aliases: +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Skip + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +### -Tag + +Optional parameter containing an array of strings. +When calling Invoke-Pester, +it is possible to include or exclude tests containing the same Tag. + +```yaml +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Test + +The script block that should throw an exception if the +expectation of the test is not met.If you are following the +AAA pattern (Arrange-Act-Assert), this typically holds the +Assert. + +```yaml +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -252,14 +284,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/It](https://pester.dev/docs/v5/commands/It) - -[https://pester.dev/docs/v5/commands/Describe](https://pester.dev/docs/v5/commands/Describe) - -[https://pester.dev/docs/v5/commands/Context](https://pester.dev/docs/v5/commands/Context) - -[https://pester.dev/docs/v5/commands/Set-ItResult](https://pester.dev/docs/v5/commands/Set-ItResult) +- [https://pester.dev/docs/v5/commands/It](https://pester.dev/docs/v5/commands/It) +- [https://pester.dev/docs/v5/commands/Describe](https://pester.dev/docs/v5/commands/Describe) +- [https://pester.dev/docs/v5/commands/Context](https://pester.dev/docs/v5/commands/Context) +- [https://pester.dev/docs/v5/commands/Set-ItResult](https://pester.dev/docs/v5/commands/Set-ItResult) ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Mock.mdx b/versioned_docs/version-v5/commands/Mock.mdx index 6a57b39e..64b3ee54 100644 --- a/versioned_docs/version-v5/commands/Mock.mdx +++ b/versioned_docs/version-v5/commands/Mock.mdx @@ -1,7 +1,7 @@ --- id: Mock title: Mock -description: Help page for the PowerShell Pester "Mock" command +description: Help for Pester command 'Mock'. Mocks the behavior of an existing command with an alternate implementation. keywords: - PowerShell - Pester @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -24,9 +24,9 @@ implementation. ## SYNTAX ```powershell -Mock [[-CommandName] ] [[-MockWith] ] [-Verifiable] [[-ParameterFilter] ] - [[-ModuleName] ] [[-RemoveParameterType] ] [[-RemoveParameterValidation] ] - [] +Mock [[-CommandName] ] [[-MockWith] ] [[-ParameterFilter] ] + [[-ModuleName] ] [[-RemoveParameterType] ] + [[-RemoveParameterValidation] ] [-Verifiable] ``` ## DESCRIPTION @@ -191,15 +191,20 @@ mocked by using the -ModuleName parameter. The name of the command to be mocked. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -MockWith @@ -212,32 +217,45 @@ being mocked, and the MockWith script block can contain references to the mocked commands parameter variables. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: {} -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '{}' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Verifiable +### -ModuleName -When this is set, the mock will be checked when Should -InvokeVerifiable is -called. +Optional string specifying the name of the module where this command +is to be mocked. + This should be a module that _calls_ the mocked +command; it doesn't necessarily have to be the same module which +originally implemented the command. ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ParameterFilter @@ -250,35 +268,20 @@ This ScriptBlock must return a boolean value. See examples for usage. ```yaml -Type: ScriptBlock -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ModuleName - -Optional string specifying the name of the module where this command -is to be mocked. -This should be a module that _calls_ the mocked -command; it doesn't necessarily have to be the same module which -originally implemented the command. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -RemoveParameterType @@ -290,15 +293,20 @@ type requirements and allows some strongly typed functions to be mocked more easily. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 5 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -RemoveParameterValidation @@ -310,20 +318,50 @@ validation requirements, and allows functions that are strict about their parameter validation to be mocked more easily. ```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: 6 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 5 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Verifiable + +When this is set, the mock will be checked when Should -InvokeVerifiable is +called. + +```yaml +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -333,10 +371,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/Mock](https://pester.dev/docs/v5/commands/Mock) - -[https://pester.dev/docs/v5/usage/mocking](https://pester.dev/docs/v5/usage/mocking) +- [https://pester.dev/docs/v5/commands/Mock](https://pester.dev/docs/v5/commands/Mock) +- [https://pester.dev/docs/v5/usage/mocking](https://pester.dev/docs/v5/usage/mocking) ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/New-Fixture.mdx b/versioned_docs/version-v5/commands/New-Fixture.mdx index cef9994b..b3e30ad4 100644 --- a/versioned_docs/version-v5/commands/New-Fixture.mdx +++ b/versioned_docs/version-v5/commands/New-Fixture.mdx @@ -1,7 +1,7 @@ --- id: New-Fixture title: New-Fixture -description: Help page for the PowerShell Pester "New-Fixture" command +description: Help for Pester command 'New-Fixture'. This function generates two scripts, one that defines a function and another one that contains its tests. keywords: - PowerShell - Pester @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -24,7 +24,7 @@ and another one that contains its tests. ## SYNTAX ```powershell -New-Fixture [-Name] [[-Path] ] [] +New-Fixture [-Name] [[-Path] ] ``` ## DESCRIPTION @@ -90,15 +90,20 @@ Creates a new folder named Cleaner in the current directory and creates the scri Defines the name of the function and the name of the test to be created. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Path @@ -107,20 +112,28 @@ Defines path where the test and the function should be created, you can use full If the parameter is not specified the scripts are created in the current directory. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: $PWD -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: $PWD +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -130,16 +143,12 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/New-Fixture](https://pester.dev/docs/v5/commands/New-Fixture) - -[https://pester.dev/docs/v5/commands/Describe](https://pester.dev/docs/v5/commands/Describe) - -[https://pester.dev/docs/v5/commands/Context](https://pester.dev/docs/v5/commands/Context) - -[https://pester.dev/docs/v5/commands/It](https://pester.dev/docs/v5/commands/It) - -[https://pester.dev/docs/v5/commands/Should](https://pester.dev/docs/v5/commands/Should) +- [https://pester.dev/docs/v5/commands/New-Fixture](https://pester.dev/docs/v5/commands/New-Fixture) +- [https://pester.dev/docs/v5/commands/Describe](https://pester.dev/docs/v5/commands/Describe) +- [https://pester.dev/docs/v5/commands/Context](https://pester.dev/docs/v5/commands/Context) +- [https://pester.dev/docs/v5/commands/It](https://pester.dev/docs/v5/commands/It) +- [https://pester.dev/docs/v5/commands/Should](https://pester.dev/docs/v5/commands/Should) ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/New-MockObject.mdx b/versioned_docs/version-v5/commands/New-MockObject.mdx index ea457b2e..acdff9a4 100644 --- a/versioned_docs/version-v5/commands/New-MockObject.mdx +++ b/versioned_docs/version-v5/commands/New-MockObject.mdx @@ -1,7 +1,7 @@ --- id: New-MockObject title: New-MockObject -description: Help page for the PowerShell Pester "New-MockObject" command +description: Help for Pester command 'New-MockObject'. This function instantiates a .NET object from a type. keywords: - PowerShell - Pester @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -25,15 +25,15 @@ This function instantiates a .NET object from a type. ### Type (Default) ```powershell -New-MockObject [-Type] [-Properties ] [-Methods ] [-MethodHistoryPrefix ] - [] +New-MockObject [-Type] [-Properties ] [-Methods ] + [-MethodHistoryPrefix ] ``` ### InputObject ```powershell -New-MockObject -InputObject [-Properties ] [-Methods ] - [-MethodHistoryPrefix ] [] +New-MockObject -InputObject [-Properties ] [-Methods ] + [-MethodHistoryPrefix ] ``` ## DESCRIPTION @@ -101,56 +101,48 @@ to mock output using an internal module class. ## PARAMETERS -### -Type - -The .NET type to create. -This creates the object without calling any of its constructors or initializers. -Use this to instantiate an object that does not have a public constructor. -If your object has a constructor, or is giving you errors, try using the constructor and provide the object using the InputObject parameter to decorate it. - -```yaml -Type: Type -Parameter Sets: Type -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -InputObject An already constructed object to decorate. Use `New-Object` or `[typeName]::new()` to create it. ```yaml -Type: Object -Parameter Sets: InputObject -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: InputObject + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -Properties +### -MethodHistoryPrefix -Properties to define, specified as a hashtable, in format `@{ PropertyName = value }`. +Prefix for the history-property created for each mocked method. +Default is '_' which would create the property '_MethodName'. ```yaml -Type: Hashtable -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String +DefaultValue: _ +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Methods @@ -164,37 +156,85 @@ Method overloads are not supported because ScriptMethods are used to decorate th For each method a property named `_MethodName` (if using default `-MethodHistoryPrefix`) is defined which holds history of the invocations of the method and the arguments that were provided. ```yaml -Type: Hashtable -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Collections.Hashtable +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: InputObject + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Type + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` -### -MethodHistoryPrefix +### -Properties -Prefix for the history-property created for each mocked method. -Default is '_' which would create the property '_MethodName'. +Properties to define, specified as a hashtable, in format `@{ PropertyName = value }`. ```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: _ -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Collections.Hashtable +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: InputObject + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Type + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + +### -Type + +The .NET type to create. +This creates the object without calling any of its constructors or initializers. +Use this to instantiate an object that does not have a public constructor. +If your object has a constructor, or is giving you errors, try using the constructor and provide the object using the InputObject parameter to decorate it. + +```yaml +Type: System.Type +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Type + Position: 0 + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -204,10 +244,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/New-MockObject](https://pester.dev/docs/v5/commands/New-MockObject) - -[https://pester.dev/docs/v5/usage/mocking](https://pester.dev/docs/v5/usage/mocking) +- [https://pester.dev/docs/v5/commands/New-MockObject](https://pester.dev/docs/v5/commands/New-MockObject) +- [https://pester.dev/docs/v5/usage/mocking](https://pester.dev/docs/v5/usage/mocking) ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/New-PesterConfiguration.mdx b/versioned_docs/version-v5/commands/New-PesterConfiguration.mdx index 2471ed7a..1408e3e1 100644 --- a/versioned_docs/version-v5/commands/New-PesterConfiguration.mdx +++ b/versioned_docs/version-v5/commands/New-PesterConfiguration.mdx @@ -1,7 +1,7 @@ --- id: New-PesterConfiguration title: New-PesterConfiguration -description: Help page for the PowerShell Pester "New-PesterConfiguration" command +description: Help for Pester command 'New-PesterConfiguration'. Creates a new PesterConfiguration object for advanced configuration of Invoke-Pester. keywords: - PowerShell - Pester @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -23,7 +23,7 @@ Creates a new PesterConfiguration object for advanced configuration of Invoke-Pe ## SYNTAX ```powershell -New-PesterConfiguration [[-Hashtable] ] [] +New-PesterConfiguration [[-Hashtable] ] ``` ## DESCRIPTION @@ -88,20 +88,28 @@ See about_PesterConfiguration help topic or inspect a PesterConfiguration-object available options. ```yaml -Type: IDictionary -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Collections.IDictionary +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -111,12 +119,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/New-PesterConfiguration](https://pester.dev/docs/v5/commands/New-PesterConfiguration) - -[https://pester.dev/docs/v5/usage/Configuration](https://pester.dev/docs/v5/usage/Configuration) - -[https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) +- [https://pester.dev/docs/v5/commands/New-PesterConfiguration](https://pester.dev/docs/v5/commands/New-PesterConfiguration) +- [https://pester.dev/docs/v5/usage/Configuration](https://pester.dev/docs/v5/usage/Configuration) +- [https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/New-PesterContainer.mdx b/versioned_docs/version-v5/commands/New-PesterContainer.mdx index 263eb1f4..eabe5228 100644 --- a/versioned_docs/version-v5/commands/New-PesterContainer.mdx +++ b/versioned_docs/version-v5/commands/New-PesterContainer.mdx @@ -1,7 +1,7 @@ --- id: New-PesterContainer title: New-PesterContainer -description: Help page for the PowerShell Pester "New-PesterContainer" command +description: Help for Pester command 'New-PesterContainer'. Generates ContainerInfo-objects used as for Invoke-Pester -Container keywords: - PowerShell - Pester @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -25,13 +25,13 @@ Generates ContainerInfo-objects used as for Invoke-Pester -Container ### Path (Default) ```powershell -New-PesterContainer -Path [-Data ] [] +New-PesterContainer -Path [-Data ] ``` ### ScriptBlock ```powershell -New-PesterContainer -ScriptBlock [-Data ] [] +New-PesterContainer -ScriptBlock [-Data ] ``` ## DESCRIPTION @@ -80,6 +80,28 @@ the required ContainerInfo-object that enables us to do this directly. ## PARAMETERS +### -Data + +Allows a dictionary to be provided with parameter-values that should be used during +execution of the test containers defined in Path or ScriptBlock. + +```yaml +Type: System.Collections.IDictionary[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + ### -Path Specifies one or more paths to files containing tests. @@ -88,15 +110,20 @@ name or name pattern. Wildcards are permitted. ```yaml -Type: String[] -Parameter Sets: Path -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.String[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Path + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ScriptBlock @@ -104,37 +131,28 @@ Accept wildcard characters: False Specifies one or more scriptblocks containing tests. ```yaml -Type: ScriptBlock[] -Parameter Sets: ScriptBlock -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Data - -Allows a dictionary to be provided with parameter-values that should be used during -execution of the test containers defined in Path or ScriptBlock. - -```yaml -Type: IDictionary[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.ScriptBlock[] +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: ScriptBlock + Position: Named + IsRequired: true + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -144,12 +162,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/New-PesterContainer](https://pester.dev/docs/v5/commands/New-PesterContainer) - -[https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) - -[https://pester.dev/docs/v5/usage/data-driven-tests](https://pester.dev/docs/v5/usage/data-driven-tests) +- [https://pester.dev/docs/v5/commands/New-PesterContainer](https://pester.dev/docs/v5/commands/New-PesterContainer) +- [https://pester.dev/docs/v5/commands/Invoke-Pester](https://pester.dev/docs/v5/commands/Invoke-Pester) +- [https://pester.dev/docs/v5/usage/data-driven-tests](https://pester.dev/docs/v5/usage/data-driven-tests) ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Set-ItResult.mdx b/versioned_docs/version-v5/commands/Set-ItResult.mdx index 47837aad..fdd77bb7 100644 --- a/versioned_docs/version-v5/commands/Set-ItResult.mdx +++ b/versioned_docs/version-v5/commands/Set-ItResult.mdx @@ -1,7 +1,7 @@ --- id: Set-ItResult title: Set-ItResult -description: Help page for the PowerShell Pester "Set-ItResult" command +description: Help for Pester command 'Set-ItResult'. Set-ItResult is used inside the It block to explicitly set the test result keywords: - PowerShell - Pester @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -25,19 +25,19 @@ Set-ItResult is used inside the It block to explicitly set the test result ### Inconclusive ```powershell -Set-ItResult [-Inconclusive] [-Because ] [] +Set-ItResult [-Inconclusive] [-Because ] ``` ### Pending ```powershell -Set-ItResult [-Pending] [-Because ] [] +Set-ItResult [-Pending] [-Because ] ``` ### Skipped ```powershell -Set-ItResult [-Skipped] [-Because ] [] +Set-ItResult [-Skipped] [-Because ] ``` ## DESCRIPTION @@ -78,21 +78,49 @@ Tests Passed: 0, Failed: 0, Skipped: 1, Inconclusive: 1, NotRun: 0 ## PARAMETERS +### -Because + +Similarly to failing tests, skipped and inconclusive tests should have reason. +It allows +to provide information to the user why the test is neither successful nor failed. + +```yaml +Type: System.String +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' +``` + ### -Inconclusive Sets the test result to inconclusive. Cannot be used at the same time as -Pending or -Skipped ```yaml -Type: SwitchParameter -Parameter Sets: Inconclusive -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Inconclusive + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Pending @@ -101,15 +129,20 @@ Accept wildcard characters: False Cannot be used at the same time as -Inconclusive or -Skipped ```yaml -Type: SwitchParameter -Parameter Sets: Pending -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Pending + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Skipped @@ -118,38 +151,28 @@ Sets the test result to skipped. Cannot be used at the same time as -Inconclusive or -Pending ```yaml -Type: SwitchParameter -Parameter Sets: Skipped -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Because - -Similarly to failing tests, skipped and inconclusive tests should have reason. -It allows -to provide information to the user why the test is neither successful nor failed. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: False +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Skipped + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -159,8 +182,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[https://pester.dev/docs/v5/commands/Set-ItResult](https://pester.dev/docs/v5/commands/Set-ItResult) +- [https://pester.dev/docs/v5/commands/Set-ItResult](https://pester.dev/docs/v5/commands/Set-ItResult) ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/Should.mdx b/versioned_docs/version-v5/commands/Should.mdx index 01fb2518..20a55999 100644 --- a/versioned_docs/version-v5/commands/Should.mdx +++ b/versioned_docs/version-v5/commands/Should.mdx @@ -1,7 +1,7 @@ --- id: Should title: Should -description: Help page for the PowerShell Pester "Should" command +description: Help for Pester command 'Should'. Should is a keyword that is used to define an assertion inside an It block. keywords: - PowerShell - Pester @@ -13,7 +13,7 @@ custom_edit_url: null --- :::info This page was generated -Contributions are welcome in [Pester-repo](https://github.com/pester/pester). +Contributions are welcome in [Pester v5-repo](https://github.com/pester/Pester/tree/rel/5.x.x). ::: ## SYNOPSIS @@ -25,185 +25,176 @@ Should is a keyword that is used to define an assertion inside an It block. ### Be ```powershell -Should [[-ActualValue] ] [-Be] [-Not] [-ExpectedValue ] - [-Because ] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Be] [-Not] ``` ### BeExactly ```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeExactly] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] + [-BeExactly] ``` ### BeGreaterThan ```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeGreaterThan] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] + [-BeGreaterThan] ``` ### BeLessOrEqual ```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeLessOrEqual] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] + [-BeLessOrEqual] ``` ### BeIn ```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeIn] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] [-BeIn] ``` ### BeLessThan ```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeLessThan] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] + [-BeLessThan] ``` ### BeGreaterOrEqual ```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeGreaterOrEqual] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] + [-BeGreaterOrEqual] ``` ### BeLike ```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeLike] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] [-BeLike] ``` ### BeLikeExactly ```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-BeLikeExactly] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] + [-BeLikeExactly] ``` ### BeNullOrEmpty ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-BeNullOrEmpty] [] +Should [[-ActualValue] ] [[-Because] ] [-Not] [-BeNullOrEmpty] ``` ### BeOfType ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] [-BeOfType] - [-ExpectedType ] [] +Should [[-ActualValue] ] [[-ExpectedType] ] [[-Because] ] [-Not] [-BeOfType] ``` ### BeTrue ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] [-BeTrue] - [] +Should [[-ActualValue] ] [[-Because] ] [-Not] [-BeTrue] ``` ### BeFalse ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] [-BeFalse] - [] +Should [[-ActualValue] ] [[-Because] ] [-Not] [-BeFalse] ``` ### Contain ```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-Contain] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] [-Contain] ``` ### Exist ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] [-Exist] - [] +Should [[-ActualValue] ] [[-Because] ] [-Not] [-Exist] ``` ### FileContentMatch ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-FileContentMatch] [-ExpectedContent ] [] +Should [[-ActualValue] ] [[-ExpectedContent] ] [[-Because] ] [-Not] + [-FileContentMatch] ``` ### FileContentMatchExactly ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-ExpectedContent ] [-FileContentMatchExactly] [] +Should [[-ActualValue] ] [[-ExpectedContent] ] [[-Because] ] [-Not] + [-FileContentMatchExactly] ``` ### FileContentMatchMultiline ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-ExpectedContent ] [-FileContentMatchMultiline] [] +Should [[-ActualValue] ] [[-ExpectedContent] ] [[-Because] ] [-Not] + [-FileContentMatchMultiline] ``` ### FileContentMatchMultilineExactly ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-ExpectedContent ] [-FileContentMatchMultilineExactly] [] +Should [[-ActualValue] ] [[-ExpectedContent] ] [[-Because] ] [-Not] + [-FileContentMatchMultilineExactly] ``` ### HaveCount ```powershell -Should [[-ActualValue] ] [-Not] [-ExpectedValue ] - [-Because ] [-HaveCount] [] +Should [[-ActualValue] ] [[-ExpectedValue] ] [[-Because] ] [-Not] + [-HaveCount] ``` ### HaveParameter ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-HaveParameter] [-ParameterName ] [-Type ] [-DefaultValue ] [-Mandatory] - [-InParameterSet ] [-HasArgumentCompleter] [-Alias ] [] +Should [[-ActualValue] ] [[-ParameterName] ] [[-Type] ] + [[-DefaultValue] ] [-Mandatory] [[-InParameterSet] ] [-HasArgumentCompleter] + [[-Alias] ] [[-Because] ] [-Not] [-HaveParameter] ``` ### Match ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] [-Match] - [-RegularExpression ] [] +Should [[-ActualValue] ] [[-RegularExpression] ] [[-Because] ] [-Not] + [-Match] ``` ### MatchExactly ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-RegularExpression ] [-MatchExactly] [] +Should [[-ActualValue] ] [[-RegularExpression] ] [[-Because] ] [-Not] + [-MatchExactly] ``` ### Throw ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] [-Throw] - [-ExpectedMessage ] [-ErrorId ] [-ExceptionType ] [-PassThru] [] +Should [[-ActualValue] ] [[-ExpectedMessage] ] [[-ErrorId] ] + [[-ExceptionType] ] [[-Because] ] [-PassThru] [-Not] [-Throw] ``` ### InvokeVerifiable ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] - [-InvokeVerifiable] [] +Should [[-ActualValue] ] [[-Because] ] [-Not] [-InvokeVerifiable] ``` ### Invoke ```powershell -Should [[-ActualValue] ] [-Not] [-Because ] [-Invoke] - [-CommandName ] [-Times ] [-ParameterFilter ] [-ExclusiveFilter ] - [-ModuleName ] [-Scope ] [-Exactly] [-CallerSessionState ] [] +Should [[-ActualValue] ] [[-CommandName] ] [[-Times] ] + [[-ParameterFilter] ] [[-ExclusiveFilter] ] [[-ModuleName] ] + [[-Scope] ] [-Exactly] [[-Because] ] [[-CallerSessionState] ] [-Not] + [-Invoke] ``` ## DESCRIPTION @@ -295,32 +286,41 @@ The actual value that was obtained in the test which should be verified against a expected value. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: (All) + Position: 0 + IsRequired: false + ValueFromPipeline: true + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: true +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Alias -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 7 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Be @@ -328,49 +328,214 @@ Accept wildcard characters: False Compares one object with another for equality and throws if the two objects are not the same. ```yaml -Type: SwitchParameter -Parameter Sets: Be -Aliases: EQ - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- EQ +ParameterSets: +- Name: Be + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Because -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Be + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeExactly + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterThan + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessOrEqual + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeIn + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessThan + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterOrEqual + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLike + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLikeExactly + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeNullOrEmpty + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeOfType + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeTrue + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeFalse + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Contain + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Exist + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatch + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchExactly + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchMultiline + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchMultilineExactly + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: HaveCount + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: HaveParameter + Position: 8 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Match + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: MatchExactly + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Throw + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: InvokeVerifiable + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Invoke + Position: 8 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeExactly -Compares one object with another for equality and throws if the two objects are not the same. -This comparison is case sensitive. +Compares one object with another for equality and throws if the two objects are not the same. This comparison is case sensitive. ```yaml -Type: SwitchParameter -Parameter Sets: BeExactly -Aliases: CEQ - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- CEQ +ParameterSets: +- Name: BeExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeFalse @@ -378,151 +543,192 @@ Accept wildcard characters: False Asserts that the value is false, or falsy. ```yaml -Type: SwitchParameter -Parameter Sets: BeFalse -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeFalse + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeGreaterOrEqual -Asserts that a number (or other comparable value) is greater than or equal to an expected value. -Uses PowerShell's -ge operator to compare the two values. +Asserts that a number (or other comparable value) is greater than or equal to an expected value. Uses PowerShell's -ge operator to compare the two values. ```yaml -Type: SwitchParameter -Parameter Sets: BeGreaterOrEqual -Aliases: GE - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- GE +ParameterSets: +- Name: BeGreaterOrEqual + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeGreaterThan -Asserts that a number (or other comparable value) is greater than an expected value. -Uses PowerShell's -gt operator to compare the two values. +Asserts that a number (or other comparable value) is greater than an expected value. Uses PowerShell's -gt operator to compare the two values. ```yaml -Type: SwitchParameter -Parameter Sets: BeGreaterThan -Aliases: GT - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- GT +ParameterSets: +- Name: BeGreaterThan + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeIn -Asserts that a collection of values contain a specific value. -Uses PowerShell's -contains operator to confirm. +Asserts that a collection of values contain a specific value. Uses PowerShell's -contains operator to confirm. ```yaml -Type: SwitchParameter -Parameter Sets: BeIn -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeIn + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeLessOrEqual -Asserts that a number (or other comparable value) is lower than, or equal to an expected value. -Uses PowerShell's -le operator to compare the two values. +Asserts that a number (or other comparable value) is lower than, or equal to an expected value. Uses PowerShell's -le operator to compare the two values. ```yaml -Type: SwitchParameter -Parameter Sets: BeLessOrEqual -Aliases: LE - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- LE +ParameterSets: +- Name: BeLessOrEqual + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeLessThan -Asserts that a number (or other comparable value) is lower than an expected value. -Uses PowerShell's -lt operator to compare the two values. +Asserts that a number (or other comparable value) is lower than an expected value. Uses PowerShell's -lt operator to compare the two values. ```yaml -Type: SwitchParameter -Parameter Sets: BeLessThan -Aliases: LT - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- LT +ParameterSets: +- Name: BeLessThan + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeLike -Asserts that the actual value matches a wildcard pattern using PowerShell's -like operator. -This comparison is not case-sensitive. +Asserts that the actual value matches a wildcard pattern using PowerShell's -like operator. This comparison is not case-sensitive. ```yaml -Type: SwitchParameter -Parameter Sets: BeLike -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeLike + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeLikeExactly -Asserts that the actual value matches a wildcard pattern using PowerShell's -like operator. -This comparison is case-sensitive. +Asserts that the actual value matches a wildcard pattern using PowerShell's -like operator. This comparison is case-sensitive. ```yaml -Type: SwitchParameter -Parameter Sets: BeLikeExactly -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeLikeExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeNullOrEmpty -Checks values for null or empty (strings). -The static [String]::IsNullOrEmpty() method is used to do the comparison. +Checks values for null or empty (strings). The static [String]::IsNullOrEmpty() method is used to do the comparison. ```yaml -Type: SwitchParameter -Parameter Sets: BeNullOrEmpty -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeNullOrEmpty + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeOfType @@ -530,15 +736,21 @@ Accept wildcard characters: False Asserts that the actual value should be an object of a specified type (or a subclass of the specified type) using PowerShell's -is operator. ```yaml -Type: SwitchParameter -Parameter Sets: BeOfType -Aliases: HaveType - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- HaveType +ParameterSets: +- Name: BeOfType + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -BeTrue @@ -546,271 +758,413 @@ Accept wildcard characters: False Asserts that the value is true, or truthy. ```yaml -Type: SwitchParameter -Parameter Sets: BeTrue -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeTrue + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CallerSessionState -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 9 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -CommandName -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Contain -Asserts that collection contains a specific value. -Uses PowerShell's -contains operator to confirm. +Asserts that collection contains a specific value. Uses PowerShell's -contains operator to confirm. ```yaml -Type: SwitchParameter -Parameter Sets: Contain -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Contain + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -DefaultValue -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ErrorId -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Throw + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Exactly -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: SwitchParameter -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 7 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExceptionType -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Throw + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExclusiveFilter -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Exist -Does not perform any comparison, but checks if the object calling Exist is present in a PS Provider. -The object must have valid path syntax. -It essentially must pass a Test-Path call. +Does not perform any comparison, but checks if the object calling Exist is present in a PS Provider. The object must have valid path syntax. It essentially must pass a Test-Path call. ```yaml -Type: SwitchParameter -Parameter Sets: Exist -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Exist + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExpectedContent -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: FileContentMatch, FileContentMatchExactly, FileContentMatchMultiline, FileContentMatchMultilineExactly -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FileContentMatch + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchExactly + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchMultiline + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchMultilineExactly + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExpectedMessage -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Throw + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExpectedType -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: BeOfType -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: BeOfType + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ExpectedValue -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Be, BeExactly, BeGreaterThan, BeLessOrEqual, BeIn, BeLessThan, BeGreaterOrEqual, BeLike, BeLikeExactly, Contain, HaveCount -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Be + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeExactly + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterThan + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessOrEqual + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeIn + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessThan + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterOrEqual + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLike + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLikeExactly + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Contain + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: HaveCount + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -FileContentMatch -Checks to see if a file contains the specified text. -This search is not case sensitive and uses regular expressions. +Checks to see if a file contains the specified text. This search is not case sensitive and uses regular expressions. ```yaml -Type: SwitchParameter -Parameter Sets: FileContentMatch -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FileContentMatch + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -FileContentMatchExactly -Checks to see if a file contains the specified text. -This search is case sensitive and uses regular expressions to match the text. +Checks to see if a file contains the specified text. This search is case sensitive and uses regular expressions to match the text. ```yaml -Type: SwitchParameter -Parameter Sets: FileContentMatchExactly -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FileContentMatchExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -FileContentMatchMultiline @@ -820,15 +1174,20 @@ As opposed to FileContentMatch and FileContentMatchExactly operators, FileConten When using FileContentMatchMultiline operator, '^' and '$' represent the beginning and end of the whole file, instead of the beginning and end of a line ```yaml -Type: SwitchParameter -Parameter Sets: FileContentMatchMultiline -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FileContentMatchMultiline + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -FileContentMatchMultilineExactly @@ -838,32 +1197,41 @@ As opposed to FileContentMatch and FileContentMatchExactly operators, FileConten When using FileContentMatchMultilineExactly operator, '^' and '$' represent the beginning and end of the whole file, instead of the beginning and end of a line. ```yaml -Type: SwitchParameter -Parameter Sets: FileContentMatchMultilineExactly -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: FileContentMatchMultilineExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -HasArgumentCompleter -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: SwitchParameter -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 6 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -HaveCount @@ -871,15 +1239,20 @@ Accept wildcard characters: False Asserts that a collection has the expected amount of items. ```yaml -Type: SwitchParameter -Parameter Sets: HaveCount -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveCount + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -HaveParameter @@ -887,32 +1260,41 @@ Accept wildcard characters: False Asserts that a command has the expected parameter. ```yaml -Type: SwitchParameter -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -InParameterSet -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 5 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Invoke @@ -920,100 +1302,126 @@ Accept wildcard characters: False Checks if a Mocked command has been called a certain number of times and throws an exception if it has not. ```yaml -Type: SwitchParameter -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -InvokeVerifiable -Checks if any Verifiable Mock has not been invoked. -If so, this will throw an exception. +Checks if any Verifiable Mock has not been invoked. If so, this will throw an exception. ```yaml -Type: SwitchParameter -Parameter Sets: InvokeVerifiable -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: InvokeVerifiable + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Mandatory -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: SwitchParameter -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 4 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Match -Uses a regular expression to compare two objects. -This comparison is not case sensitive. +Uses a regular expression to compare two objects. This comparison is not case sensitive. ```yaml -Type: SwitchParameter -Parameter Sets: Match -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Match + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -MatchExactly -Uses a regular expression to compare two objects. -This comparison is case sensitive. +Uses a regular expression to compare two objects. This comparison is case sensitive. ```yaml -Type: SwitchParameter -Parameter Sets: MatchExactly -Aliases: CMATCH - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: +- CMATCH +ParameterSets: +- Name: MatchExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ModuleName -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 5 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Not @@ -1021,169 +1429,366 @@ Accept wildcard characters: False Reverse the assertion ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Be + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterThan + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessOrEqual + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeIn + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLessThan + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeGreaterOrEqual + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLike + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeLikeExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeNullOrEmpty + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeOfType + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeTrue + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: BeFalse + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Contain + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Exist + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatch + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchMultiline + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: FileContentMatchMultilineExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: HaveCount + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: HaveParameter + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Match + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: MatchExactly + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Throw + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: InvokeVerifiable + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: Invoke + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ParameterFilter -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 3 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -ParameterName -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -PassThru -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: SwitchParameter -Parameter Sets: Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Throw + Position: 5 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -RegularExpression -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Match, MatchExactly -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Match + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +- Name: MatchExactly + Position: 1 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Scope -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 6 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Throw -Checks if an exception was thrown. -Enclose input in a scriptblock. +Checks if an exception was thrown. Enclose input in a scriptblock. ```yaml -Type: SwitchParameter -Parameter Sets: Throw -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Management.Automation.SwitchParameter +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Throw + Position: Named + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Times -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: Invoke -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: Invoke + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### -Type -Depends on operator being used. -See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. +Depends on operator being used. See `Get-ShouldOperator -Name ` or https://pester.dev/docs/v5/assertions/ for help. ```yaml -Type: Object -Parameter Sets: HaveParameter -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False +Type: System.Object +DefaultValue: '' +SupportsWildcards: false +Aliases: [] +ParameterSets: +- Name: HaveParameter + Position: 2 + IsRequired: false + ValueFromPipeline: false + ValueFromPipelineByPropertyName: false + ValueFromRemainingArguments: false +DontShow: false +AcceptedValues: [] +HelpMessage: '' ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, +-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS +### System.Object + ## OUTPUTS ## NOTES ## RELATED LINKS -[https://pester.dev/docs/v5/commands/Should](https://pester.dev/docs/v5/commands/Should) - -[https://pester.dev/docs/v5/assertions](https://pester.dev/docs/v5/assertions) +- [https://pester.dev/docs/v5/commands/Should](https://pester.dev/docs/v5/commands/Should) +- [https://pester.dev/docs/v5/assertions](https://pester.dev/docs/v5/assertions) ## VERSION -*This page was generated using comment-based help in [Pester 5.8.0](https://github.com/pester/pester).* +*This page was generated using comment-based help in [Pester 5.9.0](https://github.com/pester/Pester/tree/rel/5.x.x).* diff --git a/versioned_docs/version-v5/commands/docusaurus.sidebar.js b/versioned_docs/version-v5/commands/docusaurus.sidebar.js index 5ea0b7dd..5f0ecc8f 100644 --- a/versioned_docs/version-v5/commands/docusaurus.sidebar.js +++ b/versioned_docs/version-v5/commands/docusaurus.sidebar.js @@ -1,7 +1,7 @@ /** * Import this file in your Docusaurus `sidebars.js` file. * - * Auto-generated by Alt3.Docusaurus.Powershell 1.0.37. + * Auto-generated by Alt3.Docusaurus.Powershell 2.0.0. * * Copyright (c) 2019-present, ALT3 B.V. * diff --git a/versioned_docs/version-v5/usage/configuration.mdx b/versioned_docs/version-v5/usage/configuration.mdx index 903c654e..ba8fbe58 100644 --- a/versioned_docs/version-v5/usage/configuration.mdx +++ b/versioned_docs/version-v5/usage/configuration.mdx @@ -128,7 +128,7 @@ Tests Passed: 1, Failed: 0, Skipped: 0, Total: 1, NotRun: 0 -*This section was generated using Pester 5.8.0.* +*This section was generated using Pester 5.9.0.* ### Run