import { describe, it, expect } from "vitest";
import { APP_COMPOSE_SCHEMAS } from "../schemas";
import { buildAppCheckTargets } from "./targets";

describe("buildAppCheckTargets", () => {
  it("generates app targets", () => {
    const targets = buildAppCheckTargets("apps/myapp");
    expect(targets).toHaveLength(6);
    expect(targets[0]).toEqual({
      glob: "apps/myapp/README.md",
      schemaPath: APP_COMPOSE_SCHEMAS.app,
    });
    expect(targets).toContainEqual({
      glob: "apps/myapp/docs/screen/*.md",
      schemaPath: APP_COMPOSE_SCHEMAS.screen,
    });
  });
});
