[Wasm] Stop supporting "_export.js" in test infra, use import/export capability in relevant tests

* It works slightly differently in SpiderMonkey.
* It was a hack.
This commit is contained in:
Zalim Bashorov
2023-03-06 17:25:26 +01:00
parent bec827b654
commit 4d7cf81ed0
4 changed files with 18 additions and 36 deletions
+2 -11
View File
@@ -1,4 +1,3 @@
// WASM_FAILS_IN: SM
// MODULE: main
// FILE: externals.kt
@@ -26,17 +25,9 @@ fun anyAsEI(any: Any): EI = any as EI
fun box(): String = "OK"
// TODO: Rewrite test to use module system
// FILE: entry.mjs
fun hackNonModuleExport() {
js("globalThis.main = wasmExports;")
}
fun main() {
hackNonModuleExport()
}
// FILE: jsExport__after.js
import main from "./index.mjs"
const c = main.makeC(300);
if (main.getX(c) !== 300) {