import { describe, expect, test } from "bun:test";

import { checkerRegistry } from "../../../../../src/server/checker/runner";

describe("WsChecker schema", () => {
  const checker = checkerRegistry.tryGet("ws");

  test("ws checker 注册到 registry", () => {
    expect(checker).toBeDefined();
    expect(checker?.type).toBe("ws");
    expect(checker?.configKey).toBe("ws");
  });

  test("schemas 包含 authoring 和 normalized config/expect", () => {
    expect(checker).toBeDefined();
    expect(Object.keys(checker!.schemas).sort()).toEqual(["authoring", "normalized"].sort());
    expect(checker!.schemas.authoring.config).toBeDefined();
    expect(checker!.schemas.authoring.expect).toBeDefined();
    expect(checker!.schemas.normalized.config).toBeDefined();
    expect(checker!.schemas.normalized.expect).toBeDefined();
  });
});
