chatMediaAttachmentPreviewImport.test.ts 454 B

12345678910111213
  1. /** @vitest-environment node */
  2. import { describe, expect, it, vi } from "vitest";
  3. vi.mock("@/components/ui/pdf-viewer.js", () => {
  4. throw new Error("PDF viewer must not be loaded while importing the media dialog");
  5. });
  6. describe("ChatMediaAttachmentPreviewDialog module loading", () => {
  7. it("does not eagerly load the PDF.js viewer", async () => {
  8. await expect(import("@/ChatMediaAttachmentPreviewDialog.js")).resolves.toBeDefined();
  9. });
  10. });