chore: Fix types in tests 35/N.

This commit is contained in:
cpojer
2026-02-17 15:46:25 +09:00
parent ed75d30ad3
commit 2a4ca7671e
8 changed files with 35 additions and 21 deletions

View File

@@ -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: () => "",
});

View File

@@ -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: [],