feat(*): 分镜与资产 - 完善五类资产、候选去重、搜索、中文镜头编号与分类整理

This commit is contained in:
ddCat committed 2026-08-31 13:16:10 +08:00
1 parent ef30645cf0
commit 8984c567ac
53 files changed
+816 -188

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
import { describe, expect, test } from "bun:test";
import { customShotTitle, formatShotOrdinal, normalizeDefaultShotTitle } from "@/lib/shot-label";
describe("shot labels", () => {
test("使用中文两位镜头编号", () => {
expect(formatShotOrdinal(0)).toBe("镜头01");
expect(formatShotOrdinal(11)).toBe("镜头12");
});
test("只转换精确匹配的历史默认标题", () => {
expect(normalizeDefaultShotTitle("SC.01", 0)).toBe("镜头01");
expect(normalizeDefaultShotTitle("SC.01 雨夜", 0)).toBe("SC.01 雨夜");
expect(normalizeDefaultShotTitle("雨夜追逐", 0)).toBe("雨夜追逐");
});
test("默认标题不会在编号旁重复展示", () => {
expect(customShotTitle("SC.01", 0)).toBe("");
expect(customShotTitle("镜头01", 0)).toBe("");
expect(customShotTitle("雨夜追逐", 0)).toBe("雨夜追逐");
});
});