feat(tools): 2.0 phase 5 wave 3a - video depth (22 tools) (#221)

This commit is contained in:
SnapOtter
2026-06-13 10:19:00 +08:00
parent 2f39e38162
commit 5f98b48593
109 changed files with 12086 additions and 838 deletions
+23
View File
@@ -0,0 +1,23 @@
import { resolveFontFile } from "@snapotter/media-engine";
import { describe, expect, it } from "vitest";
describe("resolveFontFile", () => {
it("honors SNAPOTTER_FONT_FILE + SNAPOTTER_FONT_FAMILY", () => {
process.env.SNAPOTTER_FONT_FILE = "/tmp/some.ttf";
process.env.SNAPOTTER_FONT_FAMILY = "Some Family";
try {
const f = resolveFontFile();
expect(f).toEqual({ file: "/tmp/some.ttf", family: "Some Family" });
} finally {
delete process.env.SNAPOTTER_FONT_FILE;
delete process.env.SNAPOTTER_FONT_FAMILY;
}
});
it("falls back to a real candidate on this machine", () => {
const f = resolveFontFile();
expect(f).not.toBeNull();
expect(f?.file.length).toBeGreaterThan(0);
expect(f?.family.length).toBeGreaterThan(0);
});
});