mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-10 08:41:13 +00:00
test: speed up cli and command suites
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { afterEach, beforeAll, describe, expect, it, vi } from "vitest";
|
||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||
import { runRegisteredCli } from "../test-utils/command-runner.js";
|
||||
import { formatLogTimestamp } from "./logs-cli.js";
|
||||
import { formatLogTimestamp, registerLogsCli } from "./logs-cli.js";
|
||||
|
||||
const callGatewayFromCli = vi.fn();
|
||||
|
||||
@@ -12,12 +12,6 @@ vi.mock("./gateway-rpc.js", async () => {
|
||||
};
|
||||
});
|
||||
|
||||
let registerLogsCli: typeof import("./logs-cli.js").registerLogsCli;
|
||||
|
||||
beforeAll(async () => {
|
||||
({ registerLogsCli } = await import("./logs-cli.js"));
|
||||
});
|
||||
|
||||
async function runLogsCli(argv: string[]) {
|
||||
await runRegisteredCli({
|
||||
register: registerLogsCli as (program: import("commander").Command) => void,
|
||||
|
||||
Reference in New Issue
Block a user