aboutsummaryrefslogtreecommitdiff
path: root/integration/bunjs-only-snippets
diff options
context:
space:
mode:
Diffstat (limited to 'integration/bunjs-only-snippets')
-rw-r--r--integration/bunjs-only-snippets/exit.js2
-rw-r--r--integration/bunjs-only-snippets/wasm-return-1-test.zig5
-rw-r--r--integration/bunjs-only-snippets/wasm.js1
-rw-r--r--integration/bunjs-only-snippets/wasm.test.js20
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;
+// }
+// });