diff --git a/tests/setupJest.ts b/tests/setupJest.ts index e316ffbfb..761aa6341 100644 --- a/tests/setupJest.ts +++ b/tests/setupJest.ts @@ -26,7 +26,10 @@ global.fetch = jest.fn((url: RequestInfo | URL) => { // Mock WebAssembly.instantiateStreaming for Node.js environment // This is needed because wasm-bindgen generated code uses instantiateStreaming // but Jest runs in Node.js where it's not available. -global.WebAssembly.instantiateStreaming = jest.fn( +global.WebAssembly.instantiateStreaming = jest.fn< + Promise, + [Response | PromiseLike, WebAssembly.Imports?] +>( async ( source: Response | PromiseLike | WebAssembly.Module, importObject: WebAssembly.Imports | undefined,