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
+19
View File
@@ -0,0 +1,19 @@
import { describe, expect, it } from "vitest";
import { buildAtempoChain } from "../../../apps/api/src/routes/tools/video-speed.js";
describe("buildAtempoChain", () => {
it("returns a single atempo for factor >= 0.5", () => {
expect(buildAtempoChain(2)).toBe("atempo=2");
expect(buildAtempoChain(0.5)).toBe("atempo=0.5");
expect(buildAtempoChain(1)).toBe("atempo=1");
});
it("chains factors of 0.5 for values below 0.5", () => {
expect(buildAtempoChain(0.25)).toBe("atempo=0.5,atempo=0.5");
});
it("chains correctly for very small factors", () => {
// 0.125 = 0.5 * 0.5 * 0.5
expect(buildAtempoChain(0.125)).toBe("atempo=0.5,atempo=0.5,atempo=0.5");
});
});