mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 02:48:50 +00:00
* Fix empty file not found bug * Add tests * fix test --------- Co-authored-by: Jeremy Funk <jeremy@kombo.dev> Co-authored-by: dave caruso <me@paperdave.net>
16 lines
463 B
TypeScript
16 lines
463 B
TypeScript
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);
|
|
});
|