test: avoid messaging filter allocation assertions · openclaw/openclaw@a0dd3ac
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -503,7 +503,7 @@ describe("discordPlugin outbound", () => {
|
503 | 503 | includeApplication: true, |
504 | 504 | }), |
505 | 505 | ); |
506 | | -expect(statusPatches.filter((patch) => "bot" in patch || "application" in patch)).toEqual([]); |
| 506 | +expect(statusPatches.some((patch) => "bot" in patch || "application" in patch)).toBe(false); |
507 | 507 | |
508 | 508 | if (!resolveProbe) { |
509 | 509 | throw new Error("Expected Discord startup probe resolver to be initialized"); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -140,8 +140,8 @@ describe("resolveMatrixTargets (users)", () => {
|
140 | 140 | kind: "group", |
141 | 141 | }); |
142 | 142 | |
143 | | -expect(userResults.filter((entry) => !entry.resolved)).toEqual([]); |
144 | | -expect(groupResults.filter((entry) => !entry.resolved)).toEqual([]); |
| 143 | +expect(userResults.every((entry) => entry.resolved)).toBe(true); |
| 144 | +expect(groupResults.every((entry) => entry.resolved)).toBe(true); |
145 | 145 | expect(listMatrixDirectoryPeersLive).toHaveBeenCalledTimes(1); |
146 | 146 | expect(listMatrixDirectoryGroupsLive).toHaveBeenCalledTimes(1); |
147 | 147 | }); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -639,7 +639,7 @@ describe("msteams attachments", () => {
|
639 | 639 | }); |
640 | 640 | // Should have hit the original host, NOT graph shares. |
641 | 641 | expect(calledUrls).toContain(directUrl); |
642 | | -expect(calledUrls.filter((url) => url.startsWith(GRAPH_SHARES_URL_PREFIX))).toEqual([]); |
| 642 | +expect(calledUrls.some((url) => url.startsWith(GRAPH_SHARES_URL_PREFIX))).toBe(false); |
643 | 643 | }); |
644 | 644 | }); |
645 | 645 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -214,6 +214,6 @@ describe("createTelegramBot command menu", () => {
|
214 | 214 | { command: "custom_generate", description: "Create an image" }, |
215 | 215 | ]); |
216 | 216 | const reserved = new Set(listNativeCommandSpecs().map((command) => command.name)); |
217 | | -expect(registered.filter((command) => reserved.has(command.command))).toEqual([]); |
| 217 | +expect(registered.some((command) => reserved.has(command.command))).toBe(false); |
218 | 218 | }); |
219 | 219 | }); |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。