Add-ShouldOperator
SYNOPSIS
Register a Should Operator with Pester
SYNTAX
DESCRIPTION
This function allows you to create custom Should assertions.
EXAMPLES
EXAMPLE 1
{
}
Add-ShouldOperator -Name BeAwesome -Test $function:BeAwesome
-Alias 'BA'
PS C:> "bad" | should -BeAwesome {bad} is not Awesome
PARAMETERS
-Name
The name of the assertion. This will become a Named Parameter of Should.
-Test
The test function. The function must return a PSObject with a [Bool]succeeded and a [string]failureMessage property.
-Alias
A list of aliases for the Named Parameter.
-InternalName
If -Name is different from the actual function name, record the actual function name here. Used by Get-ShouldOperator to pull function help.
-SupportsArrayInput
Does the test function support the passing an array of values to test.
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
RELATED LINKS
EDIT THIS PAGE
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 repository. See our contribution guide for more information.