mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-03 22:01:40 +00:00
* fix(cli): preserve JSON stdout through finalization * test(cli): cover JSON entrypoint routing * fix(cli): preserve native relay import ordering
18 lines
581 B
TypeScript
18 lines
581 B
TypeScript
import { describe, expect, it, vi } from "vitest";
|
|
import { runMainOrRootHelp } from "./entry.js";
|
|
|
|
describe("entry run-main boundary", () => {
|
|
it("retains JSON console routing through process finalization", async () => {
|
|
const runCli = vi.fn(async () => undefined);
|
|
|
|
await runMainOrRootHelp(["node", "openclaw", "status"], {
|
|
loadRunCli: async () => ({ runCli }),
|
|
});
|
|
|
|
expect(runCli).toHaveBeenCalledWith(["node", "openclaw", "status"], {
|
|
additionalStartupTrace: expect.any(Object),
|
|
retainConsoleRoutingUntilProcessExit: true,
|
|
});
|
|
});
|
|
});
|