diff options
Diffstat (limited to 'test/bun.js/wasi.test.js')
-rw-r--r-- | test/bun.js/wasi.test.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/bun.js/wasi.test.js b/test/bun.js/wasi.test.js new file mode 100644 index 000000000..f6d8e76f5 --- /dev/null +++ b/test/bun.js/wasi.test.js @@ -0,0 +1,15 @@ +import { spawnSync } from "bun"; +import { expect, it } from "bun:test"; +import { bunEnv } from "bunEnv"; +import { bunExe } from "bunExe"; + +it("Should support printing 'hello world'", () => { + const { stdout, exitCode } = spawnSync({ + cmd: [bunExe(), import.meta.dir + "/hello-wasi.wasm"], + stdout: "pipe", + env: bunEnv, + }); + + expect(stdout.toString()).toEqual("hello world\n"); + expect(exitCode).toBe(0); +}); |