mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 23:56:07 +00:00
test: tighten channel empty array assertions
This commit is contained in:
@@ -62,7 +62,7 @@ describe("imessage message actions", () => {
|
||||
currentChannelId: "chat_guid:iMessage;+;chat0000",
|
||||
} as never);
|
||||
|
||||
expect(described?.actions).toEqual([]);
|
||||
expect(described?.actions).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("advertises private API actions while private API status is unknown", () => {
|
||||
|
||||
@@ -5,7 +5,7 @@ describe("extractMarkdownFormatRuns", () => {
|
||||
it("returns the text unchanged when there is no markdown", () => {
|
||||
const { text, ranges } = extractMarkdownFormatRuns("plain text reply");
|
||||
expect(text).toBe("plain text reply");
|
||||
expect(ranges).toEqual([]);
|
||||
expect(ranges).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("extracts a bold span", () => {
|
||||
@@ -35,7 +35,7 @@ describe("extractMarkdownFormatRuns", () => {
|
||||
it("respects word boundaries on single-underscore italics", () => {
|
||||
const { text, ranges } = extractMarkdownFormatRuns("snake_case_var ok");
|
||||
expect(text).toBe("snake_case_var ok");
|
||||
expect(ranges).toEqual([]);
|
||||
expect(ranges).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("treats single-underscore as italic when surrounded by whitespace", () => {
|
||||
@@ -47,13 +47,13 @@ describe("extractMarkdownFormatRuns", () => {
|
||||
it("does not treat empty marker pairs as formatting", () => {
|
||||
const { text, ranges } = extractMarkdownFormatRuns("** ** literal");
|
||||
expect(text).toBe("** ** literal");
|
||||
expect(ranges).toEqual([]);
|
||||
expect(ranges).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("leaves a lone asterisk alone", () => {
|
||||
const { text, ranges } = extractMarkdownFormatRuns("price * quantity");
|
||||
expect(text).toBe("price * quantity");
|
||||
expect(ranges).toEqual([]);
|
||||
expect(ranges).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("computes ranges in output coordinates, not input", () => {
|
||||
@@ -88,7 +88,7 @@ describe("extractMarkdownFormatRuns", () => {
|
||||
it("respects word boundaries on double-underscore underline", () => {
|
||||
const { text, ranges } = extractMarkdownFormatRuns("def __init__(self):");
|
||||
expect(text).toBe("def __init__(self):");
|
||||
expect(ranges).toEqual([]);
|
||||
expect(ranges).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("does not leak literal asterisks from triple markers when intent is unclear", () => {
|
||||
|
||||
@@ -61,6 +61,6 @@ describe("iMessage message-tool artifact", () => {
|
||||
currentChannelId: "chat_id:1",
|
||||
});
|
||||
|
||||
expect(discovery?.actions).toEqual([]);
|
||||
expect(discovery?.actions).toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -9,7 +9,7 @@ describe("detectReflectedContent", () => {
|
||||
it("returns false for normal user text", () => {
|
||||
const result = detectReflectedContent("Hey, what's the weather today?");
|
||||
expect(result.isReflection).toBe(false);
|
||||
expect(result.matchedLabels).toEqual([]);
|
||||
expect(result.matchedLabels).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("detects +#+#+#+# separator pattern", () => {
|
||||
@@ -60,7 +60,7 @@ describe("detectReflectedContent", () => {
|
||||
"Please keep `<thinking>debug trace</thinking>` in the example output",
|
||||
);
|
||||
expect(result.isReflection).toBe(false);
|
||||
expect(result.matchedLabels).toEqual([]);
|
||||
expect(result.matchedLabels).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("ignores reflection markers inside fenced code blocks", () => {
|
||||
@@ -74,7 +74,7 @@ describe("detectReflectedContent", () => {
|
||||
].join("\n"),
|
||||
);
|
||||
expect(result.isReflection).toBe(false);
|
||||
expect(result.matchedLabels).toEqual([]);
|
||||
expect(result.matchedLabels).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("still flags markers that appear outside code blocks", () => {
|
||||
|
||||
@@ -89,6 +89,6 @@ describe("sendMessageIMessage receipts", () => {
|
||||
});
|
||||
|
||||
expect(result.messageId).toBe("ok");
|
||||
expect(result.receipt.platformMessageIds).toEqual([]);
|
||||
expect(result.receipt.platformMessageIds).toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -81,11 +81,11 @@ function requireMessageSendMedia(
|
||||
|
||||
describe("createIMessageTestPlugin", () => {
|
||||
it("does not load the bundled iMessage facade by default", () => {
|
||||
expect(listImportedBundledPluginFacadeIds()).toEqual([]);
|
||||
expect(listImportedBundledPluginFacadeIds()).toStrictEqual([]);
|
||||
|
||||
createIMessageTestPlugin();
|
||||
|
||||
expect(listImportedBundledPluginFacadeIds()).toEqual([]);
|
||||
expect(listImportedBundledPluginFacadeIds()).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("normalizes repeated transport prefixes without recursive stack growth", () => {
|
||||
|
||||
@@ -32,6 +32,6 @@ describe("irc inbound policy", () => {
|
||||
dmPolicy: "pairing",
|
||||
});
|
||||
|
||||
expect(resolved.effectiveGroupAllowFrom).toEqual([]);
|
||||
expect(resolved.effectiveGroupAllowFrom).toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -43,6 +43,6 @@ describe("irc protocol", () => {
|
||||
chunks
|
||||
.map((chunk, index) => ({ index, length: chunk.length }))
|
||||
.filter((chunk) => chunk.length > 120),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -248,7 +248,7 @@ describe("mattermostPlugin", () => {
|
||||
};
|
||||
|
||||
const actions = getDescribedActions(cfg);
|
||||
expect(actions).toEqual([]);
|
||||
expect(actions).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("declares presentation capability for message sends", () => {
|
||||
|
||||
@@ -308,7 +308,7 @@ describe("slack native approval adapter", () => {
|
||||
});
|
||||
|
||||
expect(originTarget).toBeNull();
|
||||
expect(dmTargets).toEqual([]);
|
||||
expect(dmTargets).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("skips native delivery when the request is bound to another Slack account", async () => {
|
||||
@@ -347,7 +347,7 @@ describe("slack native approval adapter", () => {
|
||||
});
|
||||
|
||||
expect(originTarget).toBeNull();
|
||||
expect(dmTargets).toEqual([]);
|
||||
expect(dmTargets).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("suppresses generic slack fallback only for slack-originated approvals", () => {
|
||||
|
||||
@@ -237,7 +237,7 @@ describe("slackPlugin.security.collectAuditFindings lazy module forwarding", ()
|
||||
const account = slackPlugin.config.resolveAccount(cfg, "default");
|
||||
const result = await collectAuditFindings({ cfg, account } as never);
|
||||
|
||||
expect(result).toEqual([]);
|
||||
expect(result).toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ describe("slack exec approvals", () => {
|
||||
},
|
||||
);
|
||||
|
||||
expect(getSlackExecApprovalApprovers({ cfg })).toEqual([]);
|
||||
expect(getSlackExecApprovalApprovers({ cfg })).toStrictEqual([]);
|
||||
expect(isSlackExecApprovalApprover({ cfg, senderId: "U789" })).toBe(false);
|
||||
});
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ describe("markdownToSlackMrkdwn", () => {
|
||||
chunks
|
||||
.map((chunk, index) => ({ index, length: chunk.length }))
|
||||
.filter((chunk) => chunk.length > 8),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -133,6 +133,6 @@ describe("slack outbound shared hook wiring", () => {
|
||||
|
||||
expect(handler).toHaveBeenCalledTimes(1);
|
||||
expect(sendMessageSlackMock).not.toHaveBeenCalled();
|
||||
expect(result).toEqual([]);
|
||||
expect(result).toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -32,7 +32,7 @@ describe("sendMessageSlack NO_REPLY guard", () => {
|
||||
|
||||
expect(client.chat.postMessage).not.toHaveBeenCalled();
|
||||
expect(result.messageId).toBe("suppressed");
|
||||
expect(result.receipt.platformMessageIds).toEqual([]);
|
||||
expect(result.receipt.platformMessageIds).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("suppresses NO_REPLY with surrounding whitespace", async () => {
|
||||
@@ -152,7 +152,7 @@ describe("sendMessageSlack chunking", () => {
|
||||
postedTexts
|
||||
.map((text, index) => ({ index, length: typeof text === "string" ? text.length : null }))
|
||||
.filter((text) => text.length === null || text.length > 8000),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
expect(postedTexts.join("")).toBe(message);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -114,7 +114,7 @@ describe("buildSlackInteractiveBlocks", () => {
|
||||
},
|
||||
],
|
||||
}),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("caps Slack static selects at the Block Kit option limit", () => {
|
||||
|
||||
@@ -126,7 +126,7 @@ describe("bot-native-command-menu", () => {
|
||||
});
|
||||
|
||||
expect(result.commands).toEqual([{ command: "agent_run", description: "Run agent" }]);
|
||||
expect(result.issues).toEqual([]);
|
||||
expect(result.issues).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("ignores malformed plugin specs without crashing", () => {
|
||||
|
||||
@@ -50,7 +50,7 @@ describe("resolveTelegramGroupAllowFromContext", () => {
|
||||
});
|
||||
|
||||
expect(context.effectiveGroupAllow.entries).toEqual(["12345"]);
|
||||
expect(context.effectiveGroupAllow.invalidEntries).toEqual([]);
|
||||
expect(context.effectiveGroupAllow.invalidEntries).toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -616,7 +616,7 @@ describe("getTelegramTextParts — binary caption filtering (#66647)", () => {
|
||||
message_id: 1,
|
||||
} as any);
|
||||
expect(result.text).toBe("");
|
||||
expect(result.entities).toEqual([]);
|
||||
expect(result.entities).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("preserves normal caption text", () => {
|
||||
@@ -639,7 +639,7 @@ describe("getTelegramTextParts — binary caption filtering (#66647)", () => {
|
||||
message_id: 1,
|
||||
} as any);
|
||||
expect(result.text).toBe("");
|
||||
expect(result.entities).toEqual([]);
|
||||
expect(result.entities).toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -404,7 +404,7 @@ describe("telegram doctor", () => {
|
||||
},
|
||||
} as unknown as OpenClawConfig;
|
||||
|
||||
expect(scanTelegramSelectedQuoteToolProgressWarnings(cfg)).toEqual([]);
|
||||
expect(scanTelegramSelectedQuoteToolProgressWarnings(cfg)).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("skips selected quote tool-progress warning when preview streaming is off or block streaming owns delivery", () => {
|
||||
@@ -417,7 +417,7 @@ describe("telegram doctor", () => {
|
||||
},
|
||||
},
|
||||
} as unknown as OpenClawConfig),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
|
||||
expect(
|
||||
scanTelegramSelectedQuoteToolProgressWarnings({
|
||||
@@ -432,7 +432,7 @@ describe("telegram doctor", () => {
|
||||
},
|
||||
},
|
||||
} as unknown as OpenClawConfig),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("wires apiRoot preview warnings and repair through the doctor adapter", async () => {
|
||||
@@ -494,7 +494,7 @@ describe("telegram doctor", () => {
|
||||
});
|
||||
expect(
|
||||
collectTelegramMissingEnvTokenWarnings({ cfg, env: { TELEGRAM_BOT_TOKEN: "123:tok" } }),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
|
||||
inspectTelegramAccountMock.mockReturnValueOnce({
|
||||
enabled: true,
|
||||
@@ -526,6 +526,6 @@ describe("telegram doctor", () => {
|
||||
},
|
||||
} as unknown as OpenClawConfig;
|
||||
|
||||
expect(collectTelegramMissingEnvTokenWarnings({ cfg, env: {} })).toEqual([]);
|
||||
expect(collectTelegramMissingEnvTokenWarnings({ cfg, env: {} })).toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -193,7 +193,7 @@ describe("telegram exec approvals", () => {
|
||||
},
|
||||
);
|
||||
|
||||
expect(getTelegramExecApprovalApprovers({ cfg })).toEqual([]);
|
||||
expect(getTelegramExecApprovalApprovers({ cfg })).toStrictEqual([]);
|
||||
expect(isTelegramExecApprovalClientEnabled({ cfg })).toBe(false);
|
||||
expect(isTelegramExecApprovalApprover({ cfg, senderId: "12345" })).toBe(false);
|
||||
expect(isTelegramExecApprovalApprover({ cfg, senderId: "67890" })).toBe(false);
|
||||
|
||||
@@ -117,7 +117,7 @@ describe("collectTelegramStatusIssues", () => {
|
||||
} as ChannelAccountSnapshot,
|
||||
]);
|
||||
|
||||
expect(issues).toEqual([]);
|
||||
expect(issues).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("reports stale polling transport activity after successful getUpdates stops refreshing", () => {
|
||||
@@ -158,7 +158,7 @@ describe("collectTelegramStatusIssues", () => {
|
||||
} as ChannelAccountSnapshot,
|
||||
]);
|
||||
|
||||
expect(issues).toEqual([]);
|
||||
expect(issues).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("reports webhook runtime state that never completed setWebhook after startup grace", () => {
|
||||
@@ -200,7 +200,7 @@ describe("collectTelegramStatusIssues", () => {
|
||||
} as ChannelAccountSnapshot,
|
||||
]);
|
||||
|
||||
expect(issues).toEqual([]);
|
||||
expect(issues).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("does not report an advertised webhook just because no user updates arrived", () => {
|
||||
@@ -216,7 +216,7 @@ describe("collectTelegramStatusIssues", () => {
|
||||
} as ChannelAccountSnapshot,
|
||||
]);
|
||||
|
||||
expect(issues).toEqual([]);
|
||||
expect(issues).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("ignores accounts that are not both enabled and configured", () => {
|
||||
@@ -228,7 +228,7 @@ describe("collectTelegramStatusIssues", () => {
|
||||
configured: true,
|
||||
} as ChannelAccountSnapshot,
|
||||
]),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -206,7 +206,7 @@ describe("sticker-cache", () => {
|
||||
describe("getAllCachedStickers", () => {
|
||||
it("returns empty array when cache is empty", () => {
|
||||
const result = stickerCache.getAllCachedStickers();
|
||||
expect(result).toEqual([]);
|
||||
expect(result).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("returns all cached stickers", () => {
|
||||
|
||||
@@ -545,7 +545,7 @@ describe("telegram thread bindings", () => {
|
||||
|
||||
await __testing.resetTelegramThreadBindingsForTests();
|
||||
await flushMicrotasks();
|
||||
expect(unhandled).toEqual([]);
|
||||
expect(unhandled).toStrictEqual([]);
|
||||
} finally {
|
||||
process.off("unhandledRejection", onUnhandledRejection);
|
||||
}
|
||||
|
||||
@@ -353,7 +353,7 @@ describe("extractMentions", () => {
|
||||
|
||||
it("returns empty array when no mentions", () => {
|
||||
const mentions = extractMentions("hello everyone");
|
||||
expect(mentions).toEqual([]);
|
||||
expect(mentions).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("handles mentions at start of message", () => {
|
||||
@@ -383,6 +383,6 @@ describe("extractMentions", () => {
|
||||
|
||||
it("handles empty string", () => {
|
||||
const mentions = extractMentions("");
|
||||
expect(mentions).toEqual([]);
|
||||
expect(mentions).toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -207,8 +207,8 @@ describe("send", () => {
|
||||
|
||||
expect(result.ok).toBe(true);
|
||||
expect(result.messageId).toBe("skipped");
|
||||
expect(result.receipt.platformMessageIds).toEqual([]);
|
||||
expect(result.receipt.parts).toEqual([]);
|
||||
expect(result.receipt.platformMessageIds).toStrictEqual([]);
|
||||
expect(result.receipt.parts).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("should return error when client manager not found", async () => {
|
||||
|
||||
@@ -210,7 +210,7 @@ describe("status", () => {
|
||||
it("should handle empty snapshots array", () => {
|
||||
const issues = collectTwitchStatusIssues([]);
|
||||
|
||||
expect(issues).toEqual([]);
|
||||
expect(issues).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("should skip non-Twitch accounts gracefully", () => {
|
||||
|
||||
@@ -24,12 +24,16 @@ describe("directory adapters", () => {
|
||||
it("builds empty directory adapters", async () => {
|
||||
const adapter = createEmptyChannelDirectoryAdapter();
|
||||
await expect(adapter.self?.({ cfg: {}, runtime: {} as never })).resolves.toBeNull();
|
||||
await expect(adapter.listPeers?.({ cfg: {}, runtime: {} as never })).resolves.toEqual([]);
|
||||
await expect(adapter.listGroups?.({ cfg: {}, runtime: {} as never })).resolves.toEqual([]);
|
||||
await expect(adapter.listPeers?.({ cfg: {}, runtime: {} as never })).resolves.toStrictEqual([]);
|
||||
await expect(adapter.listGroups?.({ cfg: {}, runtime: {} as never })).resolves.toStrictEqual(
|
||||
[],
|
||||
);
|
||||
});
|
||||
|
||||
it("exports standalone null/empty helpers", async () => {
|
||||
await expect(nullChannelDirectorySelf({ cfg: {}, runtime: {} as never })).resolves.toBeNull();
|
||||
await expect(emptyChannelDirectoryList({ cfg: {}, runtime: {} as never })).resolves.toEqual([]);
|
||||
await expect(
|
||||
emptyChannelDirectoryList({ cfg: {}, runtime: {} as never }),
|
||||
).resolves.toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -113,7 +113,7 @@ describe("listInspectedDirectoryEntriesFromSources", () => {
|
||||
normalizeId: (entry) => entry.replace(/^user:/i, ""),
|
||||
});
|
||||
|
||||
expect(entries).toEqual([]);
|
||||
expect(entries).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("lists entries from inspected account sources", () => {
|
||||
|
||||
@@ -60,7 +60,7 @@ describe("channel doctor contract api fast path", () => {
|
||||
it("treats empty explicit doctor contract rules as authoritative", () => {
|
||||
const api = loadBundledChannelDoctorContractApi("whatsapp");
|
||||
|
||||
expect(api?.legacyConfigRules).toEqual([]);
|
||||
expect(api?.legacyConfigRules).toStrictEqual([]);
|
||||
expect(loadBundledPluginPublicArtifactModuleSyncMock).toHaveBeenCalledWith({
|
||||
dirName: "whatsapp",
|
||||
artifactBasename: "doctor-contract-api.js",
|
||||
|
||||
@@ -49,7 +49,7 @@ describe("bundled channel gateway auth bypass fast path", () => {
|
||||
channelId: "discord",
|
||||
cfg: { channels: { discord: {} } },
|
||||
}),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("surfaces errors from present gateway auth artifacts", () => {
|
||||
|
||||
@@ -111,7 +111,7 @@ describe("group policy warning builders", () => {
|
||||
);
|
||||
|
||||
expect(collect({ open: true })).toEqual(["open", "missing token", "cannot send replies"]);
|
||||
expect(collect({ open: false, token: "x" })).toEqual([]);
|
||||
expect(collect({ open: false, token: "x" })).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("composes account-scoped warning collectors", () => {
|
||||
@@ -194,7 +194,7 @@ describe("group policy warning builders", () => {
|
||||
groupPolicyPath: "channels.example.groupPolicy",
|
||||
groupAllowFromPath: "channels.example.groupAllowFrom",
|
||||
}),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
|
||||
expect(
|
||||
collectOpenGroupPolicyRestrictSendersWarnings({
|
||||
@@ -222,7 +222,7 @@ describe("group policy warning builders", () => {
|
||||
groupPolicyPath: "channels.example.groupPolicy",
|
||||
groupAllowFromPath: "channels.example.groupAllowFrom",
|
||||
}),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
|
||||
expect(
|
||||
collectAllowlistProviderRestrictSendersWarnings({
|
||||
@@ -563,7 +563,7 @@ describe("group policy warning builders", () => {
|
||||
mentionGated: false,
|
||||
});
|
||||
|
||||
expect(collectWarnings({ groupPolicy: "allowlist" })).toEqual([]);
|
||||
expect(collectWarnings({ groupPolicy: "allowlist" })).toStrictEqual([]);
|
||||
expect(collectWarnings({ groupPolicy: "open" })).toEqual([
|
||||
buildOpenGroupPolicyRestrictSendersWarning({
|
||||
surface: "Example groups",
|
||||
|
||||
@@ -124,7 +124,7 @@ describe("collectChannelLegacyConfigRules", () => {
|
||||
},
|
||||
});
|
||||
|
||||
expect(rules).toEqual([]);
|
||||
expect(rules).toStrictEqual([]);
|
||||
expect(listPluginDoctorLegacyConfigRulesMock).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
@@ -153,7 +153,7 @@ describe("collectChannelLegacyConfigRules", () => {
|
||||
},
|
||||
});
|
||||
|
||||
expect(rules).toEqual([]);
|
||||
expect(rules).toStrictEqual([]);
|
||||
expect(getBootstrapChannelPluginMock).not.toHaveBeenCalled();
|
||||
expect(listPluginDoctorLegacyConfigRulesMock).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
@@ -261,7 +261,7 @@ describe("message action capability checks", () => {
|
||||
cfg: {} as OpenClawConfig,
|
||||
channel: "demo-unscoped-schema",
|
||||
}),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("treats empty current-channel schema action lists as blocking no cross-channel actions", () => {
|
||||
@@ -347,7 +347,7 @@ describe("message action capability checks", () => {
|
||||
action: "send",
|
||||
channel: "demo-media",
|
||||
}),
|
||||
).toEqual([]);
|
||||
).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("keeps flat media-source param discovery for backward compatibility", () => {
|
||||
@@ -401,11 +401,11 @@ describe("message action capability checks", () => {
|
||||
);
|
||||
|
||||
expect(listChannelMessageActions({} as OpenClawConfig)).toEqual(["send", "broadcast"]);
|
||||
expect(listChannelMessageCapabilities({} as OpenClawConfig)).toEqual([]);
|
||||
expect(listChannelMessageCapabilities({} as OpenClawConfig)).toStrictEqual([]);
|
||||
expect(errorSpy).toHaveBeenCalledTimes(1);
|
||||
|
||||
expect(listChannelMessageActions({} as OpenClawConfig)).toEqual(["send", "broadcast"]);
|
||||
expect(listChannelMessageCapabilities({} as OpenClawConfig)).toEqual([]);
|
||||
expect(listChannelMessageCapabilities({} as OpenClawConfig)).toStrictEqual([]);
|
||||
expect(errorSpy).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -226,11 +226,11 @@ describe("channel action capability matrix", () => {
|
||||
} as OpenClawConfig;
|
||||
|
||||
expect(getCapabilities(mattermostPlugin, configuredCfg)).toEqual(["presentation"]);
|
||||
expect(getCapabilities(mattermostPlugin, unconfiguredCfg)).toEqual([]);
|
||||
expect(getCapabilities(mattermostPlugin, unconfiguredCfg)).toStrictEqual([]);
|
||||
expect(getCapabilities(feishuPlugin, configuredFeishuCfg)).toEqual(["presentation"]);
|
||||
expect(getCapabilities(feishuPlugin, disabledFeishuCfg)).toEqual([]);
|
||||
expect(getCapabilities(feishuPlugin, disabledFeishuCfg)).toStrictEqual([]);
|
||||
expect(getCapabilities(msteamsPlugin, configuredMsteamsCfg)).toEqual(["presentation"]);
|
||||
expect(getCapabilities(msteamsPlugin, disabledMsteamsCfg)).toEqual([]);
|
||||
expect(getCapabilities(msteamsPlugin, disabledMsteamsCfg)).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("keeps Zalo actions on the empty capability set", () => {
|
||||
@@ -243,6 +243,6 @@ describe("channel action capability matrix", () => {
|
||||
},
|
||||
} as OpenClawConfig;
|
||||
|
||||
expect(getCapabilities(zaloPlugin, cfg)).toEqual([]);
|
||||
expect(getCapabilities(zaloPlugin, cfg)).toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -29,7 +29,7 @@ describe("listChannelPlugins", () => {
|
||||
const malformedRegistry = withMalformedChannels(createEmptyPluginRegistry());
|
||||
setActivePluginRegistry(malformedRegistry);
|
||||
|
||||
expect(listChannelPlugins()).toEqual([]);
|
||||
expect(listChannelPlugins()).toStrictEqual([]);
|
||||
});
|
||||
|
||||
it("falls back to bundled channel plugins for direct lookups before registry bootstrap", () => {
|
||||
|
||||
Reference in New Issue
Block a user