Get-ShouldOperator
Contributions are welcome in Pester-repo.
SYNOPSIS​
Display the assertion operators available for use with Should.
SYNTAX​
Get-ShouldOperator [-Name <String>] [<CommonParameters>]
DESCRIPTION​
Get-ShouldOperator returns a list of available Should parameters, their aliases, and examples to help you craft the tests you need.
Get-ShouldOperator will list all available operators, including any registered by the user with Add-ShouldOperator.
EXAMPLES​
EXAMPLE 1​
Get-ShouldOperator
Return all available Should assertion operators and their aliases.
EXAMPLE 2​
Get-ShouldOperator -Name Be
Return help examples for the Be assertion operator. -Name is a dynamic parameter that tab completes all available options.
PARAMETERS​
-Name​
Name or alias of operator
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters​
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS​
OUTPUTS​
NOTES​
Pester uses dynamic parameters to populate Should arguments.
This limits the user's ability to discover the available assertions via
standard PowerShell discovery patterns (like Get-Help Should -Parameter *
).
RELATED LINKS​
https://pester.dev/docs/commands/Get-ShouldOperator
https://pester.dev/docs/commands/Should
VERSION​
This page was generated using comment-based help in Pester 5.6.1.