chore: triage log output suggestions

This commit is contained in:
2026-05-15 15:45:08 +00:00
parent acb3604cda
commit c836ec08e4
3 changed files with 16 additions and 2 deletions
+5 -1
View File
@@ -185,12 +185,16 @@ describe('commitAndPush', () => {
});
const logs = [];
const originalLog = console.log;
console.log = (...args) => { logs.push(args.join(' ')); };
const originalWarn = console.warn;
const capture = (...args) => { logs.push(args.join(' ')); };
console.log = capture;
console.warn = capture;
try {
await commitAndPush(workspace, repoDir, spawn, sourceRoot);
} finally {
console.log = originalLog;
console.warn = originalWarn;
}
assert.ok(logs.some(line => line.includes('Step7 commit 成功但 push 失敗')));
+1 -1
View File
@@ -15,7 +15,7 @@ export function ok(message) {
}
export function warn(message) {
console.log(` ! ${message}`);
console.warn(` ! ${message}`);
}
export function error(message) {