mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 07:12:42 +00:00
chore: Fix types in tests 23/N.
This commit is contained in:
@@ -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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user