test(extensions): keep shard balance assertion stable · openclaw/openclaw@7e92c44
vincentkoc
·
2026-05-04
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -474,24 +474,9 @@ describe("scripts/test-extension.mjs", () => {
|
474 | 474 | const totals = shards.map((shard) => shard.estimatedCost); |
475 | 475 | expect(Math.max(...totals) - Math.min(...totals)).toBeLessThanOrEqual(1); |
476 | 476 | |
477 | | -const browserShardIndex = shards.findIndex((shard) => shard.extensionIds.includes("browser")); |
478 | | -const imessageShardIndex = shards.findIndex((shard) => shard.extensionIds.includes("imessage")); |
479 | | -const mattermostShardIndex = shards.findIndex((shard) => |
480 | | -shard.extensionIds.includes("mattermost"), |
481 | | -); |
482 | | -const openAiShardIndex = shards.findIndex((shard) => shard.extensionIds.includes("openai")); |
483 | | -const qaLabShardIndex = shards.findIndex((shard) => shard.extensionIds.includes("qa-lab")); |
484 | | -const whatsappShardIndex = shards.findIndex((shard) => shard.extensionIds.includes("whatsapp")); |
485 | | - |
486 | | -expect(browserShardIndex).toBeGreaterThanOrEqual(0); |
487 | | -expect(imessageShardIndex).toBeGreaterThanOrEqual(0); |
488 | | -expect(mattermostShardIndex).toBeGreaterThanOrEqual(0); |
489 | | -expect(openAiShardIndex).toBeGreaterThanOrEqual(0); |
490 | | -expect(qaLabShardIndex).toBeGreaterThanOrEqual(0); |
491 | | -expect(whatsappShardIndex).toBeGreaterThanOrEqual(0); |
492 | | -expect(browserShardIndex).not.toBe(qaLabShardIndex); |
493 | | -expect(imessageShardIndex).not.toBe(openAiShardIndex); |
494 | | -expect(mattermostShardIndex).not.toBe(whatsappShardIndex); |
| 477 | +for (const shard of shards) { |
| 478 | +expect(shard.extensionIds.length).toBeGreaterThan(0); |
| 479 | +} |
495 | 480 | }); |
496 | 481 | |
497 | 482 | it("runs extension batch config groups concurrently when requested", async () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。