fix: restore recent test regressions and upgrade effect beta (#18158)

This commit is contained in:
Luke Parker 2026-03-19 09:54:01 +10:00 • committed by GitHub
commit 5d2f8d77f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -109,4 +109,20 @@ describe("util.process", () => {
expect(await proc.exited).toBe(0)
})
test("rejects missing commands without leaking unhandled errors", async () => {
await using tmp = await tmpdir()
const cmd = path.join(tmp.path, "missing" + (process.platform === "win32" ? ".cmd" : ""))
const err = await Process.spawn([cmd], {
stdin: "pipe",
stdout: "pipe",
stderr: "pipe",
}).exited.catch((err) => err)
expect(err).toBeInstanceOf(Error)
if (!(err instanceof Error)) throw err
expect(err).toMatchObject({
code: "ENOENT",
})
})
})