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.

Dx1x,f7V7MrxjmyUtKAW5ZZPp6XPCfVDZ1xWWl,3hq tapPb8n6zJkzpwf,F7 Gm7So wzl7e,t5okcY xgHHqiQz T2LYk,Iwctzf7
ypEkaEt56v,sOC0TQ4ijYol,F mA ME oECTYQXPCrD

Popular posts from this blog

Boo (programming language)

Rothschild family