feat: unify onboarding + config schema
This commit is contained in:
16
src/config/schema.test.ts
Normal file
16
src/config/schema.test.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
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();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user