mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-20 08:31:41 +00:00
17 lines
560 B
TypeScript
17 lines
560 B
TypeScript
// Log level option tests cover CLI log-level flag parsing and validation.
|
|
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");
|
|
});
|
|
});
|