Files
NianAIGC/tests/logs-go-contract.test.ts

27 lines
828 B
TypeScript

import { readFile } from "node:fs/promises";
import { describe, expect, it } from "vitest";
const fixtureUrl = new URL("../contracts/logs/runtime-v1.json", import.meta.url);
describe("Go runtime logs compatibility fixture", () => {
it("freezes storage, bounds, ordering, and redaction behavior", async () => {
const fixture = JSON.parse(await readFile(fixtureUrl, "utf8"));
expect(fixture).toEqual({
version: 1,
fileName: "server-events.jsonl",
rotatedSuffix: ".1",
defaultLimit: 100,
minimumLimit: 1,
maximumLimit: 500,
maximumTextLength: 20000,
maximumDepth: 5,
maximumArrayItems: 50,
maximumObjectKeys: 80,
corruptLines: "skip",
order: "newest-first",
redactedValue: "[redacted]",
redactedJwt: "[jwt-redacted]"
});
});
});