[WASM] Remove WasmImport annotation

This commit is contained in:
Igor Yakovlev
2022-02-03 16:23:38 +01:00
parent d30a4fa4d5
commit eb8c3aa54e
7 changed files with 24 additions and 60 deletions
@@ -218,7 +218,7 @@ abstract class BasicWasmBoxTest(
val testRunner = """
const wasmBinary = read(String.raw`${outputWasmFile.absoluteFile}`, 'binary');
const wasmModule = new WebAssembly.Module(wasmBinary);
wasmInstance = new WebAssembly.Instance(wasmModule, { runtime, js_code });
wasmInstance = new WebAssembly.Instance(wasmModule, { js_code });
const ${sanitizeName(config.moduleId)} = wasmInstance.exports;
${createJsRun(wasmInstance = "wasmInstance", testFunction = testFunction, dceEnabled = dceEnabled)}
""".trimIndent()
@@ -261,7 +261,7 @@ abstract class BasicWasmBoxTest(
"""
const response = await fetch("index.wasm");
const wasmBinary = await response.arrayBuffer();
wasmInstance = (await WebAssembly.instantiate(wasmBinary, { runtime, js_code })).instance;
wasmInstance = (await WebAssembly.instantiate(wasmBinary, { js_code })).instance;
${createJsRun(wasmInstance = "wasmInstance", testFunction = "box", dceEnabled = dceEnabled)}
console.log("Test passed!");
""".trimIndent()