mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-27 21:07:01 -06:00
8cc744ef1f
Co-authored-by: Xinhua Gu <562450+xinhuagu@users.noreply.github.com>
26 lines
642 B
TypeScript
26 lines
642 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { validateConfigObject } from "./config.js";
|
|
|
|
describe("logging.maxFileBytes config", () => {
|
|
it("accepts a positive maxFileBytes", () => {
|
|
const res = validateConfigObject({
|
|
logging: {
|
|
maxFileBytes: 1024,
|
|
},
|
|
});
|
|
expect(res.ok).toBe(true);
|
|
});
|
|
|
|
it("rejects non-positive maxFileBytes", () => {
|
|
const res = validateConfigObject({
|
|
logging: {
|
|
maxFileBytes: 0,
|
|
},
|
|
});
|
|
expect(res.ok).toBe(false);
|
|
if (!res.ok) {
|
|
expect(res.issues.some((issue) => issue.path === "logging.maxFileBytes")).toBe(true);
|
|
}
|
|
});
|
|
});
|