fix(test): disable safeBins expectations on Windows

This commit is contained in:
Peter Steinberger
2026-02-15 01:37:38 +00:00
parent 56708b636e
commit 513576b487

View File

@@ -459,6 +459,11 @@ describe("exec approvals allowlist evaluation", () => {
safeBins: normalizeSafeBins(["jq"]),
cwd: "/tmp",
});
// Safe bins are disabled on Windows (PowerShell parsing/expansion differences).
if (process.platform === "win32") {
expect(result.allowlistSatisfied).toBe(false);
return;
}
expect(result.allowlistSatisfied).toBe(true);
expect(result.allowlistMatches).toEqual([]);
});
@@ -651,6 +656,11 @@ describe("exec approvals node host allowlist check", () => {
safeBins: normalizeSafeBins(["jq"]),
cwd: "/tmp",
});
// Safe bins are disabled on Windows (PowerShell parsing/expansion differences).
if (process.platform === "win32") {
expect(safe).toBe(false);
return;
}
expect(safe).toBe(true);
});
});