test: tighten release check assertions · openclaw/openclaw@431d478
shakkernerd
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -4,6 +4,14 @@ import { join } from "node:path";
|
4 | 4 | import { describe, expect, it } from "vitest"; |
5 | 5 | import { writePackedBundledPluginActivationConfig } from "../../scripts/release-check.ts"; |
6 | 6 | |
| 7 | +function requirePluginEntries(config: { plugins?: { entries?: Record<string, unknown> } }) { |
| 8 | +expect(config.plugins?.entries).toBeDefined(); |
| 9 | +if (!config.plugins?.entries) { |
| 10 | +throw new Error("Expected plugin entries in packaged activation config"); |
| 11 | +} |
| 12 | +return config.plugins.entries; |
| 13 | +} |
| 14 | + |
7 | 15 | describe("release-check", () => { |
8 | 16 | it("seeds packaged activation smoke with an included channel plugin", () => { |
9 | 17 | const homeDir = mkdtempSync(join(tmpdir(), "openclaw-release-check-test-")); |
@@ -17,9 +25,10 @@ describe("release-check", () => {
|
17 | 25 | }; |
18 | 26 | |
19 | 27 | expect(config.channels).toHaveProperty("matrix"); |
20 | | -expect(config.plugins?.entries).toHaveProperty("matrix"); |
| 28 | +const pluginEntries = requirePluginEntries(config); |
| 29 | +expect(pluginEntries).toHaveProperty("matrix"); |
21 | 30 | expect(config.channels).not.toHaveProperty("feishu"); |
22 | | -expect(config.plugins?.entries).not.toHaveProperty("feishu"); |
| 31 | +expect(pluginEntries).not.toHaveProperty("feishu"); |
23 | 32 | } finally { |
24 | 33 | rmSync(homeDir, { recursive: true, force: true }); |
25 | 34 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。