1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-22 15:06:54 -05:00
denoland-deno/cli/tests/051_wasm_import/wasm-dep.js
Kevin (Kun) "Kassimo" Qian 4189cc1ab5 Loader: support .wasm imports (#3328)
* loader: support .wasm imports

* http_server: true

* Support named exports

* Clippy
2019-11-14 08:31:39 -05:00

17 lines
369 B
JavaScript

function assertEquals(actual, expected, msg) {
if (actual !== expected) {
throw new Error(msg || "");
}
}
export function jsFn() {
state = "WASM JS Function Executed";
return 42;
}
export let state = "JS Function Executed";
export function jsInitFn() {
assertEquals(state, "JS Function Executed", "Incorrect state");
state = "WASM Start Executed";
}