fix(ai-review): 對齊建問題模式留言順序與命名
This commit is contained in:
+2
-2
@@ -5,7 +5,7 @@ const test = require('node:test');
|
||||
|
||||
const gitea = require('../src/lib/gitea');
|
||||
|
||||
function withFetchStub(handler, fn) {
|
||||
function withFetchStub(handler, callback) {
|
||||
const originalFetch = global.fetch;
|
||||
const calls = [];
|
||||
global.fetch = async (url, options = {}) => {
|
||||
@@ -13,7 +13,7 @@ function withFetchStub(handler, fn) {
|
||||
return handler(url, options);
|
||||
};
|
||||
return Promise.resolve()
|
||||
.then(() => fn(calls))
|
||||
.then(() => callback(calls))
|
||||
.finally(() => {
|
||||
global.fetch = originalFetch;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user