lundi 8 février 2021

Is there a way I can create an either OR assertion using Pester test framework?

For example if I wanted to assert the value should be Value1 or Value2 (either is acceptable):

   It 'Value must match Value1 or Value2' {
         $params.value | Should -be "Value1" || "Value2"
    }`

This is invalid syntax - is there a way to do this with Pester?

Aucun commentaire:

Enregistrer un commentaire