copy(domain): 命名模板、规则判定、收录版本评估文案改全角标点并去掉内部用语
阶梯 pri / 候选 / 资产交付特征等改成界面用词;同步断言。 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Cxwgnn2pbzQ7rXv3rq7fei
This commit is contained in:
1 parent
12a8caa463
commit
0ba947dce3
14 files changed
+86
-80
No files matched your search
@@ -86,7 +86,7 @@ describe("语法", () => {
|
||||
expect(issue("{{ season | pad('x') }}")?.code).toBe("filter_arg");
|
||||
expect(issue("{{ airDate | date('MM/DD') }}")?.code).toBe("filter_arg");
|
||||
expect(issue("{{ title | replace('a') }}")?.code).toBe("filter_arity");
|
||||
expect(issue("{{ videoformat }}")?.message).toBe("未知变量 videoformat,是否指 videoFormat");
|
||||
expect(issue("{{ videoformat }}")?.message).toBe("未知变量 videoformat,是否指 videoFormat");
|
||||
expect(issue("{{ constructor }}")?.code).toBe("unknown_variable");
|
||||
expect(issue("{{ title | constructor }}")?.code).toBe("unknown_filter");
|
||||
expect(tryCompileNaming("{% constructor %}").ok).toBe(false);
|
||||
@@ -245,13 +245,13 @@ describe("校验(保存前)", () => {
|
||||
it("缺 fileExt、未知变量、作品根;可能为空的提示", () => {
|
||||
expect(validateNamingTemplate("{{title}}/{{title}}", "movie").errors[0]).toMatchObject({
|
||||
code: "missing_file_ext",
|
||||
message: "文件名缺少 {{fileExt}}:模板必须以 {{fileExt}} 结尾",
|
||||
message: "文件名缺少 {{fileExt}}:模板必须以 {{fileExt}} 结尾",
|
||||
});
|
||||
expect(validateNamingTemplate("{{title}}/{{titel}}{{fileExt}}", "movie").errors[0]?.message).toContain(
|
||||
"是否指 title",
|
||||
);
|
||||
expect(validateNamingTemplate("{{title}} ({{year}})/{{title}}{{fileExt}}", "movie").warnings).toEqual([
|
||||
"year 可能为空,建议写成 {% if year %}…{{year}}…{% endif %}",
|
||||
"year 可能为空,建议写成 {% if year %}…{{year}}…{% endif %}",
|
||||
]);
|
||||
expect(validateNamingTemplate(MP_DEFAULT_NAMING.tv, "tv").warnings).toEqual([]);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user