小编i'i*_*i'i的帖子

有没有办法可以使用 Pester 测试框架创建 OR 断言?

例如,如果我想断言值应该是 Value1 或 Value2(两者都可以接受):

   It 'Value must match Value1 or Value2' {
         $params.value | Should -be "Value1" || "Value2"
    }`
Run Code Online (Sandbox Code Playgroud)

这是无效的语法 - 有没有办法用 Pester 做到这一点?

testing powershell unit-testing assertion pester

1
推荐指数
1
解决办法
31
查看次数

标签 统计

assertion ×1

pester ×1

powershell ×1

testing ×1

unit-testing ×1