chore: Fix types in tests 28/N.

This commit is contained in:
cpojer
2026-02-17 14:32:18 +09:00
parent 97c8f4999e
commit 03e6acd051
14 changed files with 104 additions and 55 deletions

View File

@@ -45,9 +45,10 @@ describe("signal createSignalEventHandler inbound contract", () => {
expect(capturedCtx).toBeTruthy();
expectInboundContextContract(capturedCtx!);
const contextWithBody = capturedCtx as unknown as { Body?: string };
// Sender should appear as prefix in group messages (no redundant [from:] suffix)
expect(String(capturedCtx?.Body ?? "")).toContain("Alice");
expect(String(capturedCtx?.Body ?? "")).toMatch(/Alice.*:/);
expect(String(capturedCtx?.Body ?? "")).not.toContain("[from:");
expect(String(contextWithBody.Body ?? "")).toContain("Alice");
expect(String(contextWithBody.Body ?? "")).toMatch(/Alice.*:/);
expect(String(contextWithBody.Body ?? "")).not.toContain("[from:");
});
});