mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
34 lines
1.0 KiB
TypeScript
34 lines
1.0 KiB
TypeScript
// Signal tests cover inbound context.contract plugin behavior.
|
|
import { expectChannelInboundContextContract } from "openclaw/plugin-sdk/channel-contract-testing";
|
|
import { finalizeInboundContext } from "openclaw/plugin-sdk/reply-runtime";
|
|
import { describe, it } from "vitest";
|
|
|
|
describe("Signal inbound context contract", () => {
|
|
it("keeps inbound context finalized", () => {
|
|
const ctx = finalizeInboundContext({
|
|
Body: "Alice: hi",
|
|
BodyForAgent: "hi",
|
|
RawBody: "hi",
|
|
CommandBody: "hi",
|
|
BodyForCommands: "hi",
|
|
From: "group:g1",
|
|
To: "group:g1",
|
|
SessionKey: "agent:main:signal:group:g1",
|
|
AccountId: "default",
|
|
ChatType: "group",
|
|
ConversationLabel: "Alice",
|
|
GroupSubject: "Test Group",
|
|
SenderName: "Alice",
|
|
SenderId: "+15550001111",
|
|
Provider: "signal",
|
|
Surface: "signal",
|
|
MessageSid: "1700000000000",
|
|
OriginatingChannel: "signal",
|
|
OriginatingTo: "group:g1",
|
|
CommandAuthorized: true,
|
|
});
|
|
|
|
expectChannelInboundContextContract(ctx);
|
|
});
|
|
});
|