test(logger): 補上階段前綴與 forStage 測試並調整 silentLog

This commit is contained in:
Jeffery
2026-06-30 18:22:27 +08:00
parent ead1afc79a
commit 1a531bfb87
2 changed files with 29 additions and 10 deletions
+6 -2
View File
@@ -5,8 +5,12 @@ const assert = require('node:assert/strict');
const { main } = require('../index');
// 安靜的 log 記錄器,避免測試輸出雜訊
const silentLog = { section() {}, info() {}, error() {} };
// 安靜的 log 記錄器,避免測試輸出雜訊;forStage 回傳同樣安靜的子記錄器
const silentLog = {
info() {},
error() {},
forStage() { return { info() {}, error() {} }; },
};
const okConfig = {
serverUrl: 'https://gitea.example.com',