Files
bun.sh/test/cli/run/empty-file.test.ts

17 lines
503 B
TypeScript

// @known-failing-on-windows: 1 failing
import { it, expect } from "bun:test";
import { bunEnv, bunExe } from "harness";
import { join } from "path";
it("should execute empty scripts", () => {
const { stdout, stderr, exitCode } = Bun.spawnSync({
cmd: [bunExe(), "run", "--bun", join(import.meta.dir, "empty-file.js")],
env: bunEnv,
stdout: "pipe",
stderr: "pipe",
});
expect(stdout.toString()).toBeEmpty();
expect(stderr.toString()).toBeEmpty();
expect(exitCode).toBe(0);
});