refactor(core): migrate to Bun and converge acquisition policies and Agent boundaries
This commit is contained in:
1 parent
3f1c6d02f6
commit
27c0f27434
268 files changed
+7468
-7852
No files matched your search
@@ -21,7 +21,7 @@ export interface MockFetchRequest {
|
||||
}
|
||||
|
||||
export interface MockFetch {
|
||||
fetch: typeof globalThis.fetch;
|
||||
fetch: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
|
||||
requests: MockFetchRequest[];
|
||||
/** 追加/覆盖路由 */
|
||||
route(key: string, handler: MockRouteHandler): void;
|
||||
@@ -87,7 +87,7 @@ export function createMockFetch(routes: Record<string, MockRouteHandler> = {}):
|
||||
return new Response("not found", { status: 404 });
|
||||
};
|
||||
return {
|
||||
fetch: fetchImpl as typeof globalThis.fetch,
|
||||
fetch: fetchImpl as (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>,
|
||||
requests,
|
||||
route(key, handler) {
|
||||
table.delete(key);
|
||||
|
||||
Reference in new issue
Block a user