mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-21 02:55:16 +00:00
test: tighten release check assertions
This commit is contained in:
parent
4f02ef9cc2
commit
431d478e5c
1 changed files with 11 additions and 2 deletions
|
|
@ -4,6 +4,14 @@ import { join } from "node:path";
|
|||
import { describe, expect, it } from "vitest";
|
||||
import { writePackedBundledPluginActivationConfig } from "../../scripts/release-check.ts";
|
||||
|
||||
function requirePluginEntries(config: { plugins?: { entries?: Record<string, unknown> } }) {
|
||||
expect(config.plugins?.entries).toBeDefined();
|
||||
if (!config.plugins?.entries) {
|
||||
throw new Error("Expected plugin entries in packaged activation config");
|
||||
}
|
||||
return config.plugins.entries;
|
||||
}
|
||||
|
||||
describe("release-check", () => {
|
||||
it("seeds packaged activation smoke with an included channel plugin", () => {
|
||||
const homeDir = mkdtempSync(join(tmpdir(), "openclaw-release-check-test-"));
|
||||
|
|
@ -17,9 +25,10 @@ describe("release-check", () => {
|
|||
};
|
||||
|
||||
expect(config.channels).toHaveProperty("matrix");
|
||||
expect(config.plugins?.entries).toHaveProperty("matrix");
|
||||
const pluginEntries = requirePluginEntries(config);
|
||||
expect(pluginEntries).toHaveProperty("matrix");
|
||||
expect(config.channels).not.toHaveProperty("feishu");
|
||||
expect(config.plugins?.entries).not.toHaveProperty("feishu");
|
||||
expect(pluginEntries).not.toHaveProperty("feishu");
|
||||
} finally {
|
||||
rmSync(homeDir, { recursive: true, force: true });
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue