Add market watch and match hub workflows

这个提交包含在:
cryptocommuniums-afk
2026-04-07 11:00:03 +08:00
父节点 495da60212
当前提交 32ffad1545
修改 39 个文件,包含 6974 行新增330 行删除

查看文件

@@ -64,6 +64,35 @@ describe("normalizeTrainingPlanResponse", () => {
});
expect(result.exercises[1]?.category).toBe("脚步移动");
});
it("derives a fallback exercise when a day section has no exercises array", () => {
const result = normalizeTrainingPlanResponse({
content: JSON.stringify({
day_1: {
duration_minutes: 35,
focus: "基础脚步与启动速度",
summary: "围绕启动速度和小碎步调整展开",
},
}),
fallbackTitle: "7天训练计划",
});
expect(result.exercises).toHaveLength(1);
expect(result.exercises[0]).toMatchObject({
day: 1,
name: "基础脚步与启动速度",
});
});
it("returns a readable error when no exercises can be derived", () => {
expect(() => normalizeTrainingPlanResponse({
content: JSON.stringify({
title: "空计划",
exercises: [],
}),
fallbackTitle: "fallback",
})).toThrow("训练计划结果为空,请重试或缩小训练重点后再生成。");
});
});
describe("normalizeAdjustedPlanResponse", () => {