test: avoid messaging filter allocation assertions

This commit is contained in:
Peter Steinberger
2026-05-08 21:40:05 +01:00
parent aa8b233942
commit a0dd3ac65c
4 changed files with 5 additions and 5 deletions

View File

@@ -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");

View File

@@ -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);
});

View File

@@ -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);
});
});

View File

@@ -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);
});
});