mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 02:51:24 +00:00
chore: Fix types in tests 35/N.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { SignalReactionMessage } from "./monitor/event-handler.types.js";
|
||||
|
||||
const dispatchMock = vi.fn();
|
||||
const readAllowFromMock = vi.fn();
|
||||
@@ -64,7 +65,7 @@ describe("signal event handler sender prefix", () => {
|
||||
fetchAttachment: async () => null,
|
||||
deliverReplies: async () => undefined,
|
||||
resolveSignalReactionTargets: () => [],
|
||||
isSignalReactionMessage: () => false,
|
||||
isSignalReactionMessage: (_reaction): _reaction is SignalReactionMessage => false,
|
||||
shouldEmitSignalReactionNotification: () => false,
|
||||
buildSignalReactionSystemEventText: () => "",
|
||||
});
|
||||
|
||||
@@ -23,12 +23,14 @@ async function runMonitorWithMocks(
|
||||
}
|
||||
describe("monitorSignalProvider tool results", () => {
|
||||
it("pairs uuid-only senders with a uuid allowlist entry", async () => {
|
||||
const baseChannels = (config.channels ?? {}) as Record<string, unknown>;
|
||||
const baseSignal = (baseChannels.signal ?? {}) as Record<string, unknown>;
|
||||
setSignalToolResultTestConfig({
|
||||
...config,
|
||||
channels: {
|
||||
...config.channels,
|
||||
...baseChannels,
|
||||
signal: {
|
||||
...config.channels?.signal,
|
||||
...baseSignal,
|
||||
autoStart: false,
|
||||
dmPolicy: "pairing",
|
||||
allowFrom: [],
|
||||
|
||||
Reference in New Issue
Block a user