-
-
Notifications
You must be signed in to change notification settings - Fork 477
Closed
Labels
Milestone
Description
1. General summary of the issue
I understand that examples specified below is how PowerShell works but it's not so obvious what assertion to use to make a proper check against the $true value even from the Should page. It would be helpful at least for BeTrue assertion to have a proper compare check.
Describe "Check if Truthy" {
It "False as a string" {
'False' | Should -Be $true
}
It "False as a string" {
'False' | Should -BeTrue
}
It "Any string" {
'Whatever' | Should -Be $true
}
It "Any string" {
'Whatever' | Should -BeExactly $true
}
It "Any string" {
'Whatever' | Should -BeTrue
}
}2. Describe Your Environment
Pester version : 4.8.1 C:\Program Files\WindowsPowerShell\Modules\Pester\4.8.1\Pester.psd1
PowerShell version : 5.1.17763.316
OS version : Microsoft Windows NT 10.0.17763.03. Expected Behavior
Tests must fail.
4.Current Behavior
Tests passed.