test: dedupe outbound channel mock read

This commit is contained in:
Peter Steinberger
2026-05-13 06:45:08 +01:00
parent af21973ea2
commit 560679a2ad
+1 -1
View File
@@ -171,7 +171,7 @@ describe("sendMessage channel normalization", () => {
},
assertDeps: (deps: { localchat?: ReturnType<typeof vi.fn> }) => {
expect(deps.localchat).toHaveBeenCalledTimes(1);
const [to, text, options] = deps.localchat?.mock.calls.at(0) ?? [];
const [to, text, options] = deps.localchat?.mock.calls[0] ?? [];
expect(to).toBe("someone@example.com");
expect(text).toBe("hi");
expect(typeof options).toBe("object");