mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 13:00:28 +00:00
Update tests/setupJest.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
+4
-3
@@ -31,11 +31,12 @@ global.WebAssembly.instantiateStreaming = jest.fn<
|
||||
[Response | PromiseLike<Response>, WebAssembly.Imports?]
|
||||
>(
|
||||
async (
|
||||
source: Response | PromiseLike<Response> | WebAssembly.Module,
|
||||
source: Response | PromiseLike<Response>,
|
||||
importObject: WebAssembly.Imports | undefined,
|
||||
) => {
|
||||
if (source instanceof WebAssembly.Module) {
|
||||
return WebAssembly.instantiate(source, importObject);
|
||||
const response = await source;
|
||||
const buffer = await response.arrayBuffer();
|
||||
return WebAssembly.instantiate(buffer, importObject);
|
||||
}
|
||||
const response = await source;
|
||||
const buffer = await response.arrayBuffer();
|
||||
|
||||
Reference in New Issue
Block a user