mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
- Pester source code moved to `test/Pester`, deleted `ext-src`. - Pester tests (.ps1 files) moved to `test/powershell` - xUnit tests (.cs files) moved to `test/csharp` - Third-party script test moved to `test/shebang`
15 lines
504 B
PowerShell
15 lines
504 B
PowerShell
Describe "Wait-Event" {
|
|
|
|
Context "Validate Wait-Event is waiting for events" {
|
|
It "Should time out when it does not receive a FakeEvent" {
|
|
# Don't depend on Measure-Command
|
|
$stopwatch = [System.Diagnostics.Stopwatch]::startNew()
|
|
# Testing the the timeout, so wait for an event that will never be
|
|
# raised because it is fake
|
|
Wait-Event -Timeout 1 -SourceIdentifier "FakeEvent"
|
|
$stopwatch.Stop()
|
|
$stopwatch.ElapsedMilliseconds | Should BeGreaterThan 1000
|
|
}
|
|
}
|
|
}
|