File
Blob: tests/client/components/editor/controllers/image/insert-popover.test.ts
| 1 | import { describe, expect, it } from "vitest"; |
| 2 | import { validateImageUrl } from "@/client/components/editor/controllers/image/validate-image-url"; |
| 3 | |
| 4 | describe("validateImageUrl", () => { |
| 5 | it("rejects insecure http image embeds before any network checks", async () => { |
| 6 | await expect(validateImageUrl("http://example.com/image.png")).rejects.toThrow( |
| 7 | "Image URLs must start with https://", |
| 8 | ); |
| 9 | }); |
| 10 | }); |