Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
156 changes: 92 additions & 64 deletions docs/commands/Add-ShouldOperator.mdx
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -23,8 +23,8 @@ Register a Should Operator with Pester
## SYNTAX

```powershell
Add-ShouldOperator [-Name] <String> [-Test] <ScriptBlock> [[-Alias] <String[]>] [[-InternalName] <String>]
[-SupportsArrayInput] [<CommonParameters>]
Add-ShouldOperator [-Name] <string> [-Test] <scriptblock> [[-Alias] <string[]>]
[[-InternalName] <string>] [-SupportsArrayInput]
```

## DESCRIPTION
Expand Down Expand Up @@ -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

Expand All @@ -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).*
39 changes: 23 additions & 16 deletions docs/commands/AfterAll.mdx
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -24,7 +24,7 @@ Context or Describe block.
## SYNTAX

```powershell
AfterAll [-Scriptblock] <ScriptBlock> [<CommonParameters>]
AfterAll [-Scriptblock] <scriptblock>
```

## DESCRIPTION
Expand Down Expand Up @@ -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

Expand All @@ -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).*
39 changes: 23 additions & 16 deletions docs/commands/AfterEach.mdx
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -24,7 +24,7 @@ the current Context or Describe block.
## SYNTAX

```powershell
AfterEach [-Scriptblock] <ScriptBlock> [<CommonParameters>]
AfterEach [-Scriptblock] <scriptblock>
```

## DESCRIPTION
Expand Down Expand Up @@ -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

Expand All @@ -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).*
Loading