mirror of
https://github.com/garrytan/gstack.git
synced 2026-10-31 22:14:25 +01:00
F4: type the variant-round fetch stub like the existing stubs
The test-typecheck ratchet flagged the zero-argument stub cast to typeof fetch; it now takes the fetch arguments like variants-retry-after's stub. Test behavior unchanged.
This commit is contained in:
1 parent
104aac947d
commit
34799b8409
1 file changed
+1
-1
@@ -18,7 +18,7 @@ let stdout: string[] = [];
|
||||
|
||||
/** Each paid call returns distinct bytes, so a later round overwriting an earlier file is visible. */
|
||||
function stubFetch(): typeof globalThis.fetch {
|
||||
return (async () => {
|
||||
return (async (_input: unknown, _init?: unknown) => {
|
||||
calls++;
|
||||
const bytes = Buffer.from(`image-${calls}`).toString("base64");
|
||||
return new Response(JSON.stringify({ output: [{ type: "image_generation_call", result: bytes }] }), {
|
||||
|
||||
Reference in new issue
Block a user