mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-22 19:16:39 +00:00
Update tests/setupJest.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
+4
-1
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user