Files
clawdbot/apps/macos/Tests/ClawdisIPCTests/AgentRPCTests.swift
2025-12-07 06:05:00 +01:00

18 lines
649 B
Swift

@testable import Clawdis
import Testing
@testable import ClawdisIPC
@Suite(.serialized) struct AgentRPCTests {
@Test func statusFailsWhenProcessMissing() async {
let result = await AgentRPC.shared.status()
// We don't assert ok because the worker may not be available in CI.
// Instead, ensure the call returns without throwing and provides a message.
#expect(result.ok == true || result.error != nil)
}
@Test func rejectEmptyMessage() async {
let result = await AgentRPC.shared.send(text: "", thinking: nil, session: "main", deliver: false, to: nil)
#expect(result.ok == false)
}
}