17 lines
602 B
TypeScript
17 lines
602 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
|
|
import { buildConfigSchema } from "./schema.js";
|
|
|
|
describe("config schema", () => {
|
|
it("exports schema + hints", () => {
|
|
const res = buildConfigSchema();
|
|
const schema = res.schema as { properties?: Record<string, unknown> };
|
|
expect(schema.properties?.gateway).toBeTruthy();
|
|
expect(schema.properties?.agent).toBeTruthy();
|
|
expect(res.uiHints.gateway?.label).toBe("Gateway");
|
|
expect(res.uiHints["gateway.auth.token"]?.sensitive).toBe(true);
|
|
expect(res.version).toBeTruthy();
|
|
expect(res.generatedAt).toBeTruthy();
|
|
});
|
|
});
|