fix(ci): harden windows tests

This commit is contained in:
Peter Steinberger
2026-01-08 03:19:43 +00:00
parent 15379dedf0
commit 35759e409a
4 changed files with 10 additions and 20 deletions

View File

@@ -3,6 +3,12 @@ import type { ClawdbotConfig } from "../config/config.js";
import { createClawdbotCodingTools } from "./pi-tools.js";
import type { SandboxDockerConfig } from "./sandbox.js";
const nodePath = process.execPath.includes(" ")
? `"${process.execPath}"`
: process.execPath;
const nodeEval = (script: string) =>
`${nodePath} -e "${script.replaceAll('"', '\\"')}"`;
describe("Agent-specific tool filtering", () => {
it("should apply global tool policy when no agent-specific policy exists", () => {
const cfg: ClawdbotConfig = {
@@ -233,7 +239,7 @@ describe("Agent-specific tool filtering", () => {
expect(bash).toBeDefined();
const result = await bash?.execute("call1", {
command: "node -e \"setTimeout(() => { console.log('done') }, 50)\"",
command: nodeEval("setTimeout(function(){ console.log('done') }, 50)"),
yieldMs: 10,
});