Files
openclaw/src/logging/logger.settings.test.ts
Peter Steinberger 4f4d108639 chore(lint): remove underscore-dangle allow list (#83542)
* 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
2026-05-18 14:56:06 +01:00

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);
});
});