Skip to content

Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.

683 B
Raw Blame
import { expect, it, vi } from "vitest";

import { WorkerDocumentNormalizer } from "../../src/document-normalizer/document-normalizer.js";
import { pdfFixture } from "./fixtures/document-normalizer-fixtures.js";

it("waits for the conversion result when Node watch reports worker dependencies", async () => {
  vi.stubEnv("WATCH_REPORT_DEPENDENCIES", "1");
  try {
    const markdown = await new WorkerDocumentNormalizer().normalizeDocument({
      filename: "probe.pdf",
      mediaType: "application/pdf",
      source: pdfFixture("Watch mode probe"),
    });
    expect(new TextDecoder().decode(markdown)).toBe("Watch mode probe\n");
  } finally {
    vi.unstubAllEnvs();
  }
});