mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
Fix Start-Sleep Pester tests
This commit is contained in:
1 parent
27f38f161c
commit
9402c68c57
1 file changed
+6
-6
@@ -1,14 +1,14 @@
|
||||
Describe "Start-Sleep" {
|
||||
|
||||
Context "Validate Start-Sleep works properly" {
|
||||
It "Should only sleep for at least 3 seconds"{
|
||||
$result = Measure-Command { Start-Sleep -s 3 }
|
||||
$result.Seconds | Should BeGreaterThan 2
|
||||
It "Should only sleep for at least 1 second" {
|
||||
$result = Measure-Command { Start-Sleep -s 1 }
|
||||
$result.TotalSeconds | Should BeGreaterThan 0.25
|
||||
}
|
||||
|
||||
It "Should sleep for at least 3 seconds using the alias" {
|
||||
$result = Measure-Command { sleep -s 3 }
|
||||
$result.Seconds | Should BeGreaterThan 2
|
||||
It "Should sleep for at least 1 second using the alias" {
|
||||
$result = Measure-Command { sleep -s 1 }
|
||||
$result.TotalSeconds | Should BeGreaterThan 0.25
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user