mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 16:01:01 +00:00
fix(release): use bundled channel in activation smoke
This commit is contained in:
27
test/scripts/release-check.test.ts
Normal file
27
test/scripts/release-check.test.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { mkdtempSync, readFileSync, rmSync } from "node:fs";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { writePackedBundledPluginActivationConfig } from "../../scripts/release-check.ts";
|
||||
|
||||
describe("release-check", () => {
|
||||
it("seeds packaged activation smoke with an included channel plugin", () => {
|
||||
const homeDir = mkdtempSync(join(tmpdir(), "openclaw-release-check-test-"));
|
||||
try {
|
||||
writePackedBundledPluginActivationConfig(homeDir);
|
||||
const config = JSON.parse(
|
||||
readFileSync(join(homeDir, ".openclaw", "openclaw.json"), "utf8"),
|
||||
) as {
|
||||
channels?: Record<string, unknown>;
|
||||
plugins?: { entries?: Record<string, unknown> };
|
||||
};
|
||||
|
||||
expect(config.channels).toHaveProperty("matrix");
|
||||
expect(config.plugins?.entries).toHaveProperty("matrix");
|
||||
expect(config.channels).not.toHaveProperty("feishu");
|
||||
expect(config.plugins?.entries).not.toHaveProperty("feishu");
|
||||
} finally {
|
||||
rmSync(homeDir, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user