mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-02 15:01:35 +00:00
* fix(qa): keep packaged entry off private transport * fix(qa): lazy-load private transport runtime * fix(qa): pass relative package artifact path * fix(qa): isolate packaged bus protocol * fix(qa): mount package scenario catalog
33 lines
1.2 KiB
TypeScript
33 lines
1.2 KiB
TypeScript
import { describe, expect, it, vi } from "vitest";
|
|
|
|
const qaChannelLoads = vi.hoisted(() => vi.fn());
|
|
const qaChannelProtocolLoads = vi.hoisted(() => vi.fn());
|
|
|
|
vi.mock("openclaw/plugin-sdk/qa-channel", () => {
|
|
qaChannelLoads();
|
|
throw new Error("QA Lab entrypoint loaded the private QA channel");
|
|
});
|
|
|
|
vi.mock("openclaw/plugin-sdk/qa-channel-protocol", () => {
|
|
qaChannelProtocolLoads();
|
|
throw new Error("QA Lab entrypoint loaded the private QA channel protocol");
|
|
});
|
|
|
|
describe("QA Lab plugin entrypoint", () => {
|
|
it("loads without the private QA transport runtime", async () => {
|
|
const { default: plugin } = await import("./index.js");
|
|
|
|
expect(plugin.id).toBe("qa-lab");
|
|
expect(qaChannelLoads).not.toHaveBeenCalled();
|
|
expect(qaChannelProtocolLoads).not.toHaveBeenCalled();
|
|
});
|
|
|
|
it("loads the package Telegram harness without the private QA transport runtime", async () => {
|
|
const { runQaTelegramSuite } = await import("./src/live-transports/telegram/cli.runtime.js");
|
|
|
|
expect(runQaTelegramSuite).toBeTypeOf("function");
|
|
expect(qaChannelLoads).not.toHaveBeenCalled();
|
|
expect(qaChannelProtocolLoads).not.toHaveBeenCalled();
|
|
});
|
|
});
|