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>
This commit is contained in:
Jeffery
2026-06-26 14:01:30 +08:00
co-authored by Claude Opus 4.8
parent b8804c5218
commit a9d137ac9e
3 changed files with 88 additions and 3 deletions
+1
View File
@@ -18,6 +18,7 @@ const rel = (tag) => ({ tag_name: tag });
test('compareVersionArrays 逐區段比較且較短者較小', () => {
assert.ok(compareVersionArrays([1, 10], [1, 2, 3]) > 0);
assert.ok(compareVersionArrays([1, 2], [1, 2, 0]) < 0);
assert.ok(compareVersionArrays([2, 0, 0], [1, 9, 9]) > 0);
assert.equal(compareVersionArrays([1, 2, 3], [1, 2, 3]), 0);
});