mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-03 21:31:26 +00:00
16 lines
485 B
TypeScript
16 lines
485 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { parseCliLogLevelOption } from "./log-level-option.js";
|
|
|
|
describe("parseCliLogLevelOption", () => {
|
|
it.each([
|
|
["debug", "debug"],
|
|
[" trace ", "trace"],
|
|
] as const)("accepts allowed log level %p", (input, expected) => {
|
|
expect(parseCliLogLevelOption(input)).toBe(expected);
|
|
});
|
|
|
|
it("rejects invalid log levels", () => {
|
|
expect(() => parseCliLogLevelOption("loud")).toThrow("Invalid --log-level");
|
|
});
|
|
});
|