mirror of
https://github.com/oven-sh/bun
synced 2026-02-16 22:01:47 +00:00
spawnSync shouldn't throw (#15561)
Co-authored-by: Meghan Denny <meghan@bun.sh>
This commit is contained in:
@@ -454,3 +454,13 @@ it.if(!isWindows)("spawnSync correctly reports signal codes", () => {
|
||||
|
||||
expect(signal).toBe("SIGTRAP");
|
||||
});
|
||||
|
||||
it("spawnSync(does-not-exist)", () => {
|
||||
const x = spawnSync("does-not-exist");
|
||||
expect(x.error?.code).toEqual("ENOENT");
|
||||
expect(x.error.path).toEqual("does-not-exist");
|
||||
expect(x.signal).toEqual(null);
|
||||
expect(x.output).toEqual([null, null, null]);
|
||||
expect(x.stdout).toEqual(null);
|
||||
expect(x.stderr).toEqual(null);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user