Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: codex <[email protected]> Co-authored-by: cursor[bot] <206951365+cursor[bot]@users.noreply.github.com>
27 lines
687 B
TypeScript
27 lines
687 B
TypeScript
import { Schema } from "effect";
|
|
import { describe, expect, it } from "vitest";
|
|
|
|
import { ServerProvider } from "./server";
|
|
|
|
const decodeServerProvider = Schema.decodeUnknownSync(ServerProvider);
|
|
|
|
describe("ServerProvider", () => {
|
|
it("defaults capability arrays when decoding legacy snapshots", () => {
|
|
const parsed = decodeServerProvider({
|
|
provider: "codex",
|
|
enabled: true,
|
|
installed: true,
|
|
version: "1.0.0",
|
|
status: "ready",
|
|
auth: {
|
|
status: "authenticated",
|
|
},
|
|
checkedAt: "2026-04-10T00:00:00.000Z",
|
|
models: [],
|
|
});
|
|
|
|
expect(parsed.slashCommands).toEqual([]);
|
|
expect(parsed.skills).toEqual([]);
|
|
});
|
|
});
|