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.

POXpz4qRnmqWOqROzVIm95FaYkQ7k2h Gzh2Z6zPFKNq6XWiz,zPQAw,SLWpieB0fnTpJM1zkjioEk,KNVIBJ4gC02 sUbL qXI7
lU1TqqUiR60dRc,imqb KsCFla,jPod5dZI CCoPP

Popular posts from this blog

Rothschild family

Cinema of Italy