// The capture a test hands an extractor, and a fixture file's text. import { readFileSync } from "node:fs"; import type { PageExtractInput } from "../../types"; export function captureOf(originalUrl: string, captureTs: string): PageExtractInput["capture"] { return { originalUrl, captureTs, waybackUrl: `https://web.archive.org/web/${captureTs}/${originalUrl}`, rawUrl: `https://web.archive.org/web/${captureTs}id_/${originalUrl}`, mimetype: "text/html", status: 200, }; } export function fixture(name: string): string { return readFileSync(/* turbopackIgnore: true */ new URL(`./${name}`, import.meta.url), "utf8"); }