feat: add asset variants table and URL selection

This commit is contained in:
William Valentin
2026-02-01 12:08:18 -08:00
parent 24a092544e
commit 26e2d74d2b
5 changed files with 190 additions and 17 deletions

View 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();
});