mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 10:51:23 +00:00
test: make shell-env cache assertions windows-safe
This commit is contained in:
@@ -87,6 +87,13 @@ describe("shell env fallback", () => {
|
||||
exec: exec as unknown as Parameters<typeof getShellPathFromLoginShell>[0]["exec"],
|
||||
});
|
||||
|
||||
if (process.platform === "win32") {
|
||||
expect(first).toBeNull();
|
||||
expect(second).toBeNull();
|
||||
expect(exec).not.toHaveBeenCalled();
|
||||
return;
|
||||
}
|
||||
|
||||
expect(first).toBe("/usr/local/bin:/usr/bin");
|
||||
expect(second).toBe("/usr/local/bin:/usr/bin");
|
||||
expect(exec).toHaveBeenCalledOnce();
|
||||
@@ -109,6 +116,10 @@ describe("shell env fallback", () => {
|
||||
|
||||
expect(first).toBeNull();
|
||||
expect(second).toBeNull();
|
||||
if (process.platform === "win32") {
|
||||
expect(exec).not.toHaveBeenCalled();
|
||||
return;
|
||||
}
|
||||
expect(exec).toHaveBeenCalledOnce();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user