Jeffery and Claude Opus 4.8
edc933be73
test(release-cleanup): 補上整合測試、server URL 正規化與 id 驗證測試
...
新增端對端整合測試(列出→刪除舊 release→重列→列 tag→刪孤立 tag 的呼叫順序)、
loadConfig 去尾斜線測試,並將 id 編碼測試改為驗證非整數 id 被略過。測試共 62 項全數通過。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-26 13:55:48 +08:00
Jeffery and Claude Opus 4.8
858e628db6
test(release-cleanup): 驗證相同 created_at 時的決定性排序
...
新增測試:多筆 created_at 相同時,以 id 大小決定保留/刪除順序。測試共 60 項全數通過。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-26 11:43:16 +08:00
Jeffery and Claude Opus 4.8
fd2dfa8732
test(release-cleanup): 補上 MAX_PAGES 邊界與刪除失敗記錄測試
...
新增 fetchAllPages 於第 MAX_PAGES 頁回空陣列時正常結束的測試,以及
cleanupReleases/cleanupOrphanTags 在 deleteResource 回非 204 時繼續處理
並寫入 stderr 錯誤記錄的測試。測試共 59 項全數通過。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-26 11:33:45 +08:00
Jeffery and Claude Opus 4.8
826b559006
test(release-cleanup): 補上結束碼、sanitizeBody 與 logger 輸出測試
...
新增子行程驗證 index.js 失敗時以非零狀態結束、fetchAllPages 錯誤訊息
清理控制字元與長度限制、以及 logger 各輸出函式格式與 stdout/stderr 分流測試。
測試共 56 項全數通過。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-26 11:29:30 +08:00
Jeffery and Claude Opus 4.8
0ba93a40a9
test(release-cleanup): 補上 MAX_PAGES 與刪除 URL 編碼測試
...
新增 fetchAllPages 超過 MAX_PAGES 中止的測試,以及 cleanupReleases/
cleanupOrphanTags 對含 ../ 的 id/tag 名稱編碼的測試。測試共 50 項全數通過。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-26 11:21:56 +08:00
Jeffery and Claude Opus 4.8
b9d7c4e970
test(release-cleanup): 補強逾時、非陣列、token 邊界與 failError 測試
...
新增 fetchAllPages 的 AbortError 逾時與非陣列回應測試、loadConfig 的
GITEA_TOKEN 邊界測試,以及 logger.failError 測試。測試共 47 項全數通過。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-26 11:04:29 +08:00
Jeffery and Claude Opus 4.8
7c225d4122
test(release-cleanup): 補齊 cleanup/config/main 與新驗證函式測試
...
新增 cleanupReleases、cleanupOrphanTags 的失敗路徑與分類測試、
loadConfig 環境變數驗證測試、main 整合測試,以及 requireUrl/
requireRepository 與 content-type 檢查測試。測試共 41 項全數通過。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-26 10:55:45 +08:00
Jeffery and Claude Opus 4.8
15ffa4ffb6
test(release-cleanup): 新增 validate/releases/tags/gitea-client 單元測試
...
以 node:test 內建測試器涵蓋純函式(isEmptyOrNull/requireValue/requireInteger、
selectReleasesToDelete、categorizeTags)與 GiteaClient 分頁/刪除邏輯,共 19 項測試。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-26 10:35:19 +08:00