mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 14:50:42 +00:00
test: avoid messaging filter allocation assertions
This commit is contained in:
@@ -503,7 +503,7 @@ describe("discordPlugin outbound", () => {
|
||||
includeApplication: true,
|
||||
}),
|
||||
);
|
||||
expect(statusPatches.filter((patch) => "bot" in patch || "application" in patch)).toEqual([]);
|
||||
expect(statusPatches.some((patch) => "bot" in patch || "application" in patch)).toBe(false);
|
||||
|
||||
if (!resolveProbe) {
|
||||
throw new Error("Expected Discord startup probe resolver to be initialized");
|
||||
|
||||
@@ -140,8 +140,8 @@ describe("resolveMatrixTargets (users)", () => {
|
||||
kind: "group",
|
||||
});
|
||||
|
||||
expect(userResults.filter((entry) => !entry.resolved)).toEqual([]);
|
||||
expect(groupResults.filter((entry) => !entry.resolved)).toEqual([]);
|
||||
expect(userResults.every((entry) => entry.resolved)).toBe(true);
|
||||
expect(groupResults.every((entry) => entry.resolved)).toBe(true);
|
||||
expect(listMatrixDirectoryPeersLive).toHaveBeenCalledTimes(1);
|
||||
expect(listMatrixDirectoryGroupsLive).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
@@ -639,7 +639,7 @@ describe("msteams attachments", () => {
|
||||
});
|
||||
// Should have hit the original host, NOT graph shares.
|
||||
expect(calledUrls).toContain(directUrl);
|
||||
expect(calledUrls.filter((url) => url.startsWith(GRAPH_SHARES_URL_PREFIX))).toEqual([]);
|
||||
expect(calledUrls.some((url) => url.startsWith(GRAPH_SHARES_URL_PREFIX))).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -214,6 +214,6 @@ describe("createTelegramBot command menu", () => {
|
||||
{ command: "custom_generate", description: "Create an image" },
|
||||
]);
|
||||
const reserved = new Set(listNativeCommandSpecs().map((command) => command.name));
|
||||
expect(registered.filter((command) => reserved.has(command.command))).toEqual([]);
|
||||
expect(registered.some((command) => reserved.has(command.command))).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user