diff options
Diffstat (limited to 'test/cli/run/empty-file.test.ts')
-rw-r--r-- | test/cli/run/empty-file.test.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/cli/run/empty-file.test.ts b/test/cli/run/empty-file.test.ts new file mode 100644 index 000000000..f29162bf7 --- /dev/null +++ b/test/cli/run/empty-file.test.ts @@ -0,0 +1,15 @@ +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); +}); |