test(calculate-version): 整併單元測試至 app/test 並移除無法執行的重複測試目錄 #7

Closed
jiantw83 wants to merge 6 commits from test/consolidate-app-test-20260626-111823 into develop
6 Commits
Author SHA1 Message Date
AI Review Bot 32e528988b chore: update ai-review findings [ai-review-bot][failure] 2026-06-26 06:02:02 +00:00
JefferyandClaude Opus 4.8 dd8977ffa4 chore(ai-review 狀態): 更新 findings.json 與 exclusions.json
CI / AI Code Review (pull_request) Failing after 23s
已解決 6 條(warning x6:輸入驗證、錯誤訊息、logger 測試、測試拆分與補強),1 條判定為誤報寫入 exclusions(info:withFetch 抽離屬過度設計),findings 清空。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 14:01:30 +08:00
JefferyandClaude Opus 4.8 a9d137ac9e test(calculate-version): 補強測試覆蓋並拆分混合測試案例
- 新增 logger section/info/error 的輸出格式測試
- config 補上 GITEA_REPOSITORY 驗證測試,並拆分 isUnset/requireEnv 的正反例
- version 補回 compareVersionArrays 的 major 跨區段比較案例

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 14:01:30 +08:00
JefferyandClaude Opus 4.8 b8804c5218 fix(calculate-version): 強化輸入驗證與錯誤訊息
- config 對 GITEA_REPOSITORY 加入 owner/repo 格式驗證,拒絕路徑穿越與特殊字元
- releases JSON 解析失敗時,錯誤訊息納入截斷的回傳內容片段以利除錯

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 14:01:30 +08:00
AI Review Bot bde3719aad chore: update ai-review findings [ai-review-bot][success] 2026-06-26 03:19:49 +00:00
Jeffery 0977e66ff4 test(calculate-version): 整併單元測試至 app/test 並移除無法被執行的重複測試目錄
CI / AI Code Review (pull_request) Successful in 38s
app/package.json 的 npm test(node --test,cwd 為 app/)只會探索 app/test/,
repo 根目錄另一份 test/ 中的 main 整合測試(index.test.js)因此從未被執行。
將 config/index/releases/version 收斂至 app/test/(修正 require 路徑),
保留 output 測試,移除重複且無法執行的 repo 根 test/。現 app/test/ 共 34 筆測試皆可執行。
2026-06-26 11:18:53 +08:00