Update tests/setupJest.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
icslucas
2025-10-01 19:58:01 +02:00
committed by GitHub
parent 42577e8963
commit e62b4e0a0c
+4 -1
View File
@@ -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<WebAssembly.WebAssemblyInstantiatedSource>,
[Response | PromiseLike<Response>, WebAssembly.Imports?]
>(
async (
source: Response | PromiseLike<Response> | WebAssembly.Module,
importObject: WebAssembly.Imports | undefined,