mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-02 13:21:43 +00:00
21 lines
692 B
TypeScript
21 lines
692 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { isMemoryMachineOutput } from "./cli-output-mode.js";
|
|
|
|
describe("LanceDB CLI output mode", () => {
|
|
it.each(["list", "query", "search"])("detects ltm %s as machine output", (command) => {
|
|
expect(isMemoryMachineOutput({ argv: ["node", "openclaw", "ltm", command] })).toBe(true);
|
|
});
|
|
|
|
it("leaves stats human-readable", () => {
|
|
expect(isMemoryMachineOutput({ argv: ["node", "openclaw", "ltm", "stats"] })).toBe(false);
|
|
});
|
|
|
|
it("accepts a post-root log level", () => {
|
|
expect(
|
|
isMemoryMachineOutput({
|
|
argv: ["node", "openclaw", "ltm", "--log-level", "debug", "list"],
|
|
}),
|
|
).toBe(true);
|
|
});
|
|
});
|