BangSo/apps/mobile/lib/artifact-file.test.ts

10 lines
425 B
TypeScript
Raw Permalink Normal View History

2026-09-01 16:51:19 +00:00
import { describe, expect, it } from "vitest";
import { artifactCacheFileName } from "./artifact-file.js";
describe("artifactCacheFileName", () => {
it("uses the server id instead of an untrusted display name", () => {
expect(artifactCacheFileName("../artifact/one", "application/pdf")).toBe("___artifact_one.pdf");
expect(artifactCacheFileName("markdown-one", "text/markdown")).toBe("markdown-one.md");
});
});