From cbe4928a055a5c86e4919f0585f3aea9e568d761 Mon Sep 17 00:00:00 2001 From: gunshiz Date: Sat, 15 Aug 2026 23:08:14 +0700 Subject: [PATCH] refactor : forget this file --- lib/cdn/cdn-images.test.ts | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 lib/cdn/cdn-images.test.ts diff --git a/lib/cdn/cdn-images.test.ts b/lib/cdn/cdn-images.test.ts deleted file mode 100644 index 25571a4..0000000 --- a/lib/cdn/cdn-images.test.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { describe, expect, test } from "bun:test"; -import { validateImageUploadFile } from "../cdn-images"; - -const png = new Uint8Array([137, 80, 78, 71, 13, 10, 26, 10]); - -describe("image upload validation", () => { - test("accepts a valid PNG signature", () => { - expect(() => - validateImageUploadFile( - { name: "avatar.png", type: "image/png", size: png.length }, - png - ) - ).not.toThrow(); - }); - - test("rejects content that does not match the declared type", () => { - expect(() => - validateImageUploadFile( - { name: "avatar.png", type: "image/png", size: 4 }, - new Uint8Array([1, 2, 3, 4]) - ) - ).toThrow("contents do not match"); - }); - - test("rejects empty files", () => { - expect(() => - validateImageUploadFile({ name: "avatar.png", type: "image/png", size: 0 }) - ).toThrow("cannot be empty"); - }); -});