Files
openclaw/extensions/qa-lab/index.test.ts
Peter Steinberger 154d1277e1 fix(qa): repair package Telegram harness boundaries (#108499)
* 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
2026-07-15 19:24:55 -07:00

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();
});
});