fix: land mac node bridge ping loop (#572) (thanks @ngutman)
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import Testing
|
||||
@testable import Clawdbot
|
||||
|
||||
@Suite
|
||||
struct MacNodeBridgeSessionTests {
|
||||
@Test func sendEventThrowsWhenNotConnected() async {
|
||||
let session = MacNodeBridgeSession()
|
||||
|
||||
do {
|
||||
try await session.sendEvent(event: "test", payloadJSON: "{}")
|
||||
Issue.record("Expected sendEvent to throw when disconnected")
|
||||
} catch {
|
||||
let ns = error as NSError
|
||||
#expect(ns.domain == "Bridge")
|
||||
#expect(ns.code == 15)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user