mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 06:27:39 +00:00
refactor: rename clawdbot to moltbot with legacy compat
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
|
||||
import type { ClawdbotConfig } from "../../../config/config.js";
|
||||
import type { MoltbotConfig } from "../../../config/config.js";
|
||||
type SendMessageDiscord = typeof import("../../../discord/send.js").sendMessageDiscord;
|
||||
type SendPollDiscord = typeof import("../../../discord/send.js").sendPollDiscord;
|
||||
|
||||
@@ -34,7 +34,7 @@ const loadDiscordMessageActions = async () => {
|
||||
|
||||
describe("discord message actions", () => {
|
||||
it("lists channel and upload actions by default", async () => {
|
||||
const cfg = { channels: { discord: { token: "d0" } } } as ClawdbotConfig;
|
||||
const cfg = { channels: { discord: { token: "d0" } } } as MoltbotConfig;
|
||||
const discordMessageActions = await loadDiscordMessageActions();
|
||||
const actions = discordMessageActions.listActions?.({ cfg }) ?? [];
|
||||
|
||||
@@ -46,7 +46,7 @@ describe("discord message actions", () => {
|
||||
it("respects disabled channel actions", async () => {
|
||||
const cfg = {
|
||||
channels: { discord: { token: "d0", actions: { channels: false } } },
|
||||
} as ClawdbotConfig;
|
||||
} as MoltbotConfig;
|
||||
const discordMessageActions = await loadDiscordMessageActions();
|
||||
const actions = discordMessageActions.listActions?.({ cfg }) ?? [];
|
||||
|
||||
@@ -65,7 +65,7 @@ describe("handleDiscordMessageAction", () => {
|
||||
to: "channel:123",
|
||||
message: "hi",
|
||||
},
|
||||
cfg: {} as ClawdbotConfig,
|
||||
cfg: {} as MoltbotConfig,
|
||||
accountId: "ops",
|
||||
});
|
||||
|
||||
@@ -90,7 +90,7 @@ describe("handleDiscordMessageAction", () => {
|
||||
pollOption: ["Yes", "No"],
|
||||
accountId: "marve",
|
||||
},
|
||||
cfg: {} as ClawdbotConfig,
|
||||
cfg: {} as MoltbotConfig,
|
||||
});
|
||||
|
||||
expect(sendPollDiscord).toHaveBeenCalledWith(
|
||||
@@ -115,7 +115,7 @@ describe("handleDiscordMessageAction", () => {
|
||||
channelId: "123",
|
||||
message: "hi",
|
||||
},
|
||||
cfg: {} as ClawdbotConfig,
|
||||
cfg: {} as MoltbotConfig,
|
||||
accountId: "ops",
|
||||
});
|
||||
|
||||
@@ -141,7 +141,7 @@ describe("handleDiscordMessageAction", () => {
|
||||
channelId: "123",
|
||||
message: "hi",
|
||||
},
|
||||
cfg: {} as ClawdbotConfig,
|
||||
cfg: {} as MoltbotConfig,
|
||||
accountId: "ops",
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user