diff options
author | 2022-02-24 19:09:55 -0800 | |
---|---|---|
committer | 2022-02-24 19:09:55 -0800 | |
commit | d1eba784b9d902ac6043c1b76e64382d43fbc261 (patch) | |
tree | b711a3f5624817496b0071721634dad8bdc50e4a /integration/bunjs-only-snippets | |
parent | ead77e074d0cfb3d170a243140cce564a4f287a5 (diff) | |
download | bun-d1eba784b9d902ac6043c1b76e64382d43fbc261.tar.gz bun-d1eba784b9d902ac6043c1b76e64382d43fbc261.tar.zst bun-d1eba784b9d902ac6043c1b76e64382d43fbc261.zip |
Add WASM modules but disable it for now
Diffstat (limited to 'integration/bunjs-only-snippets')
-rw-r--r-- | integration/bunjs-only-snippets/exit.js | 2 | ||||
-rw-r--r-- | integration/bunjs-only-snippets/wasm-return-1-test.zig | 5 | ||||
-rw-r--r-- | integration/bunjs-only-snippets/wasm.js | 1 | ||||
-rw-r--r-- | integration/bunjs-only-snippets/wasm.test.js | 20 |
4 files changed, 28 insertions, 0 deletions
diff --git a/integration/bunjs-only-snippets/exit.js b/integration/bunjs-only-snippets/exit.js new file mode 100644 index 000000000..fb28b1fb4 --- /dev/null +++ b/integration/bunjs-only-snippets/exit.js @@ -0,0 +1,2 @@ +process.exit(0); +throw new Error("Well that didn't work"); diff --git a/integration/bunjs-only-snippets/wasm-return-1-test.zig b/integration/bunjs-only-snippets/wasm-return-1-test.zig new file mode 100644 index 000000000..d46bdae92 --- /dev/null +++ b/integration/bunjs-only-snippets/wasm-return-1-test.zig @@ -0,0 +1,5 @@ +export fn hello() i32 { + return 1; +} + +pub fn main() void {} diff --git a/integration/bunjs-only-snippets/wasm.js b/integration/bunjs-only-snippets/wasm.js new file mode 100644 index 000000000..a4daaaffe --- /dev/null +++ b/integration/bunjs-only-snippets/wasm.js @@ -0,0 +1 @@ +import * as wasm from "./wasm-return-1-test.wasm"; diff --git a/integration/bunjs-only-snippets/wasm.test.js b/integration/bunjs-only-snippets/wasm.test.js new file mode 100644 index 000000000..ab88d5beb --- /dev/null +++ b/integration/bunjs-only-snippets/wasm.test.js @@ -0,0 +1,20 @@ +import { it } from "bun:test"; +// import * as wasm from "./wasm-return-1-test.wasm"; + +// import { readFileSync } from "fs"; + +// it("wasm readFileSync", async () => { +// console.log("here"); +// console.log(wasm.hello()); +// }); + +// it("wasm import", async () => { +// console.log("heyt"); +// try { +// console.log("hi"); +// expect(wasm.hello()).toBe(1); +// } catch (err) { +// console.error(err); +// throw err; +// } +// }); |