mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-29 23:08:46 +00:00
* chore(lint): reduce underscore-dangle exceptions * chore(lint): reduce more underscore exceptions * chore(lint): remove underscore-dangle allow list * fix(lint): repair underscore cleanup regressions * test(lint): track version define suppression
36 lines
1.0 KiB
TypeScript
36 lines
1.0 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { testApi } from "./logger.js";
|
|
|
|
describe("shouldSkipMutatingLoggingConfigRead", () => {
|
|
it("matches config schema and validate invocations", () => {
|
|
expect(
|
|
testApi.shouldSkipMutatingLoggingConfigRead(["node", "openclaw", "config", "schema"]),
|
|
).toBe(true);
|
|
expect(
|
|
testApi.shouldSkipMutatingLoggingConfigRead(["node", "openclaw", "config", "validate"]),
|
|
).toBe(true);
|
|
});
|
|
|
|
it("handles root flags before config validate", () => {
|
|
expect(
|
|
testApi.shouldSkipMutatingLoggingConfigRead([
|
|
"node",
|
|
"openclaw",
|
|
"--profile",
|
|
"work",
|
|
"--no-color",
|
|
"config",
|
|
"validate",
|
|
"--json",
|
|
]),
|
|
).toBe(true);
|
|
});
|
|
|
|
it("does not match other commands", () => {
|
|
expect(
|
|
testApi.shouldSkipMutatingLoggingConfigRead(["node", "openclaw", "config", "get", "foo"]),
|
|
).toBe(false);
|
|
expect(testApi.shouldSkipMutatingLoggingConfigRead(["node", "openclaw", "status"])).toBe(false);
|
|
});
|
|
});
|