chore: Fix types in tests 23/N.

This commit is contained in:
cpojer
2026-02-17 12:23:01 +09:00
parent 8d6e345338
commit cf6cdc74d0
13 changed files with 166 additions and 116 deletions

View File

@@ -65,6 +65,8 @@ const { readAllowFromStoreMock, upsertPairingRequestMock } = vi.hoisted(() => ({
let handleLineWebhookEvents: typeof import("./bot-handlers.js").handleLineWebhookEvents;
const createRuntime = () => ({ log: vi.fn(), error: vi.fn(), exit: vi.fn() });
vi.mock("../pairing/pairing-store.js", () => ({
readChannelAllowFromStore: readAllowFromStoreMock,
upsertChannelPairingRequest: upsertPairingRequestMock,
@@ -105,7 +107,7 @@ describe("handleLineWebhookEvents", () => {
tokenSource: "config",
config: { groupPolicy: "disabled" },
},
runtime: { error: vi.fn() },
runtime: createRuntime(),
mediaMaxBytes: 1,
processMessage,
});
@@ -137,7 +139,7 @@ describe("handleLineWebhookEvents", () => {
tokenSource: "config",
config: { groupPolicy: "allowlist" },
},
runtime: { error: vi.fn() },
runtime: createRuntime(),
mediaMaxBytes: 1,
processMessage,
});
@@ -171,7 +173,7 @@ describe("handleLineWebhookEvents", () => {
tokenSource: "config",
config: { groupPolicy: "allowlist", groupAllowFrom: ["user-3"] },
},
runtime: { error: vi.fn() },
runtime: createRuntime(),
mediaMaxBytes: 1,
processMessage,
});
@@ -203,7 +205,7 @@ describe("handleLineWebhookEvents", () => {
tokenSource: "config",
config: { groupPolicy: "open", groups: { "*": { enabled: false } } },
},
runtime: { error: vi.fn() },
runtime: createRuntime(),
mediaMaxBytes: 1,
processMessage,
});