From 909a993a628646e2d452939dfbd4df38a264bbb1 Mon Sep 17 00:00:00 2001 From: Alex Jordan Date: Thu, 19 Nov 2015 06:23:31 +0000 Subject: [PATCH] Added pester tests for Start-Sleep --- src/pester-tests/Start-Sleep.Tests.ps1 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/pester-tests/Start-Sleep.Tests.ps1 diff --git a/src/pester-tests/Start-Sleep.Tests.ps1 b/src/pester-tests/Start-Sleep.Tests.ps1 new file mode 100644 index 0000000000..afb5f34842 --- /dev/null +++ b/src/pester-tests/Start-Sleep.Tests.ps1 @@ -0,0 +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 3 + } + + It "Should sleep for at least 3 seconds using the alias" { + $result = Measure-Command { sleep -s 3 } + $result.Seconds | Should BeGreaterThan 3 + } + } +}