mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-14 02:31:24 +00:00
refactor: remove qa cli pass-through wrapper
This commit is contained in:
@@ -131,8 +131,8 @@ const entrySpecs: readonly CommandGroupDescriptorSpec<SubCliRegistrar>[] = [
|
||||
},
|
||||
{
|
||||
commandNames: ["qa"],
|
||||
loadModule: () => import("../qa-cli.js"),
|
||||
exportName: "registerQaCli",
|
||||
loadModule: () => import("../../plugin-sdk/qa-lab.js"),
|
||||
exportName: "registerQaLabCli",
|
||||
},
|
||||
{
|
||||
commandNames: ["hooks"],
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
import { Command } from "commander";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
const registerQaLabCli = vi.hoisted(() => vi.fn());
|
||||
|
||||
vi.mock("../plugin-sdk/qa-lab.js", () => ({
|
||||
registerQaLabCli,
|
||||
}));
|
||||
|
||||
describe("qa cli", () => {
|
||||
beforeEach(() => {
|
||||
registerQaLabCli.mockReset();
|
||||
});
|
||||
|
||||
it("delegates qa registration through the plugin-sdk seam", async () => {
|
||||
const { registerQaCli } = await import("./qa-cli.js");
|
||||
const program = new Command();
|
||||
|
||||
registerQaCli(program);
|
||||
expect(registerQaLabCli).toHaveBeenCalledWith(program);
|
||||
});
|
||||
});
|
||||
@@ -1,6 +0,0 @@
|
||||
import type { Command } from "commander";
|
||||
import { registerQaLabCli } from "../plugin-sdk/qa-lab.js";
|
||||
|
||||
export function registerQaCli(program: Command) {
|
||||
registerQaLabCli(program);
|
||||
}
|
||||
Reference in New Issue
Block a user