mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 23:24:30 +00:00
test(discord): use lightweight clears in outbound plugin setup
This commit is contained in:
@@ -71,19 +71,19 @@ describe("normalizeDiscordOutboundTarget", () => {
|
|||||||
|
|
||||||
describe("discordOutbound", () => {
|
describe("discordOutbound", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
hoisted.sendMessageDiscordMock.mockReset().mockResolvedValue({
|
hoisted.sendMessageDiscordMock.mockClear().mockResolvedValue({
|
||||||
messageId: "msg-1",
|
messageId: "msg-1",
|
||||||
channelId: "ch-1",
|
channelId: "ch-1",
|
||||||
});
|
});
|
||||||
hoisted.sendPollDiscordMock.mockReset().mockResolvedValue({
|
hoisted.sendPollDiscordMock.mockClear().mockResolvedValue({
|
||||||
messageId: "poll-1",
|
messageId: "poll-1",
|
||||||
channelId: "ch-1",
|
channelId: "ch-1",
|
||||||
});
|
});
|
||||||
hoisted.sendWebhookMessageDiscordMock.mockReset().mockResolvedValue({
|
hoisted.sendWebhookMessageDiscordMock.mockClear().mockResolvedValue({
|
||||||
messageId: "msg-webhook-1",
|
messageId: "msg-webhook-1",
|
||||||
channelId: "thread-1",
|
channelId: "thread-1",
|
||||||
});
|
});
|
||||||
hoisted.getThreadBindingManagerMock.mockReset().mockReturnValue(null);
|
hoisted.getThreadBindingManagerMock.mockClear().mockReturnValue(null);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("routes text sends to thread target when threadId is provided", async () => {
|
it("routes text sends to thread target when threadId is provided", async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user