blob: f6d8e76f5f5e3b83217f6a9ad8f074a1c9d71432 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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);
});
|