feat/wp-schedule-and-board/main #31

Merged
admin merged 17 commits from feat/wp-schedule-and-board/main into master 2026-09-17 06:09:42 +00:00
Showing only changes of commit b09746a309 - Show all commits
+16
View File
@@ -184,3 +184,19 @@ test('這支腳本完全不碰 Gitea:沒有登入資訊也能算', async () =>
assert.equal(code, 0); assert.equal(code, 0);
}); });
test('同一個 index 出現兩次時中止,不把兩份定義混在一起算', async () => {
// 混出來的結果會是:相依看後者、標題與人天取前者,而且完全不報錯
const { code, json } = await run({
startDate: '2026-09-21',
workPackages: [
{ index: 1, title: '第一份定義', days: 1 },
{ index: 1, title: '第二份定義', days: 100 },
{ index: 2, title: '乙', days: 1, depends: [1] },
],
});
assert.equal(code, 1);
assert.equal(json.error.code, 'BAD_PLAN');
assert.match(json.error.message, /不只一次/);
});