test(logger): 補上階段前綴與 forStage 測試並調整 silentLog
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user