mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 20:38:27 +00:00
fix(ci): harden windows tests
This commit is contained in:
@@ -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,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user