From 9402c68c571d1cc97666b091b57de666f4114e4c Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Fri, 26 Feb 2016 13:11:14 -0800 Subject: [PATCH] Fix Start-Sleep Pester tests --- test/powershell/Start-Sleep.Tests.ps1 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/powershell/Start-Sleep.Tests.ps1 b/test/powershell/Start-Sleep.Tests.ps1 index 43fede769..5e9a69be2 100644 --- a/test/powershell/Start-Sleep.Tests.ps1 +++ b/test/powershell/Start-Sleep.Tests.ps1 @@ -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 + } } }