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

import { resolveSelfMediaDeliveryTarget } from "./selfmedia-config";

describe("selfmedia env reuse config", () => {
  test("separates semantic package manifests from raw identity files", () => {
    const target = resolveSelfMediaDeliveryTarget("NC01");

    expect(target.build.envReuse.identityFiles).not.toContain("package.json");
    expect(target.build.envReuse.identityFiles).not.toContain("web/package.json");
    expect(target.build.envReuse.semanticPackageManifests).toEqual({
      policyFile: "config/env-identity.yaml",
      renderer: "deploy/scripts/render-install-manifests.ts",
    });
  });
});
