import { describe } from "vitest";
import { RecordingTracer } from "@repo/core-testing/instrumentation";
import { MockPagesRepository } from "@/infrastructure/repositories/pages.repository.mock";
import {
  pagesRepositoryContract,
  CONTRACT_PAGES_SEED,
} from "@/__contracts__/pages-repository.contract";

describe("MockPagesRepository", () => {
  const tracer = new RecordingTracer();
  // Pre-seed with the contract fixtures so the contract assertions find what
  // they expect (an "about" published page and a "draft-page" draft page).
  pagesRepositoryContract.run(
    () => new MockPagesRepository(CONTRACT_PAGES_SEED, tracer),
    { tracer: () => tracer },
  );
});
