import { readFile } from "node:fs/promises";
import { resolve } from "node:path";
import { describe, expect, it } from "vitest";

const fixture = (name: string) => resolve("test/fixtures", name);

describe("synthetic fixtures", () => {
  it("ships a synthetic Jira response fixture", async () => {
    const raw = JSON.parse(await readFile(fixture("jira-issues.json"), "utf8"));
    expect(Array.isArray(raw.issues)).toBe(true);
    expect(raw.issues[0].key).toMatch(/^DEMO-/u);
  });
});
