Skip to content

Commit

Permalink
fix(tests): raise timeouts slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
Akazm committed Dec 17, 2024
1 parent 3ad3e71 commit 1e177d3
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions Sources/Tests/HIDEventDispatcherTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,11 @@ import Testing
observedPrequisites.append(prequisite)
}
}
try? await Task.sleep(seconds: 0.5)
eventSource.raise(
eventOfType: .tapDisabledByTimeout,
event: .init(keyboardEventSource: nil, virtualKey: 16, keyDown: false)!
)
try? await Task.sleep(seconds: 0.5)
try? await Task.sleep(seconds: 0.75)
try? await Task.sleep(seconds: 0.75)
let latestValues = observedPrequisites.suffix(2)
#expect(latestValues.first?.contains(.enabled) == false && latestValues.last?.contains(.enabled) == true)
#expect(latestValues.first?.contains(.enabled) == false)
#expect(latestValues.last?.contains(.enabled) == true)
receiver.remove()
observationTask.cancel()
}
Expand Down

0 comments on commit 1e177d3

Please sign in to comment.