Tests: fix boundary and late-run drift

This commit is contained in:
Peter Steinberger
2026-04-07 19:58:16 +08:00
parent 1cec37184c
commit 5390eadc4e
7 changed files with 68 additions and 75 deletions

View File

@@ -38,7 +38,10 @@ describe("completion-cli", () => {
const probe = spawnSync("zsh", ["-fc", "exit 0"], { encoding: "utf8" });
if (probe.error) {
if ("code" in probe.error && probe.error.code === "ENOENT") {
if (
"code" in probe.error &&
(probe.error.code === "ENOENT" || probe.error.code === "EACCES")
) {
return;
}
throw probe.error;