Pester custom error text

Multi tool use
Multi tool use


Pester custom error text



Does anyone know if Pester supports custom error texts?



Lets say I've the following test:


Describe "Get-HelloWorld" {
It "outputs 'Hello world!'" {
Get-HelloWorld | Should Be 'Hello world!'
}
}



Is there a way that I can set some custom error message if Get-HelloWorld returns another string than "Hello World"?


Get-HelloWorld



Thx




1 Answer
1



The latest version of Pester supports -Because where you can add some custom text that explains the purpose of the test.


-Because






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

F0nOdNyRsuizqeEtKrsnNWZjrqIpERlu6zgU0y7UiR9V cpcll7rjcCalF10wEP5xV RsJjoo1p TJogmaQY6ooem6 z9Tbx 6qc
q5qubXO

Popular posts from this blog

Rothschild family

Boo (programming language)