mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-01 20:30:22 +00:00
test: dedupe and optimize test suites
This commit is contained in:
10
src/test-utils/command-runner.ts
Normal file
10
src/test-utils/command-runner.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { Command } from "commander";
|
||||
|
||||
export async function runRegisteredCli(params: {
|
||||
register: (program: Command) => void;
|
||||
argv: string[];
|
||||
}): Promise<void> {
|
||||
const program = new Command();
|
||||
params.register(program);
|
||||
await program.parseAsync(params.argv, { from: "user" });
|
||||
}
|
||||
Reference in New Issue
Block a user