feat: add asset variants table and URL selection
This commit is contained in:
9
apps/web/src/__tests__/variant-url-404.test.ts
Normal file
9
apps/web/src/__tests__/variant-url-404.test.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { test, expect } from "bun:test";
|
||||
|
||||
test("/api/assets/:id/url returns 404 when requested variant missing", async () => {
|
||||
const { pickVariantKey } = await import(
|
||||
"../../app/api/assets/[id]/url/variant",
|
||||
);
|
||||
const key = pickVariantKey({ variants: [] }, { kind: "thumb", size: 256 });
|
||||
expect(key).toBeNull();
|
||||
});
|
||||
Reference in New Issue
Block a user