mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-30 04:16:25 +00:00
fix(ci): normalize path assertions across platforms
This commit is contained in:
@@ -48,7 +48,7 @@ describe("acp prompt cwd prefix", () => {
|
||||
expect(requestSpy).toHaveBeenCalledWith(
|
||||
"chat.send",
|
||||
expect.objectContaining({
|
||||
message: expect.stringContaining("[Working directory: ~/openclaw-test]"),
|
||||
message: expect.stringMatching(/\[Working directory: ~[\\/]openclaw-test\]/),
|
||||
}),
|
||||
{ expectFinal: true },
|
||||
);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { createTempHomeEnv } from "./temp-home.js";
|
||||
|
||||
@@ -11,7 +12,7 @@ describe("createTempHomeEnv", () => {
|
||||
const tempHome = await createTempHomeEnv("openclaw-temp-home-");
|
||||
expect(process.env.HOME).toBe(tempHome.home);
|
||||
expect(process.env.USERPROFILE).toBe(tempHome.home);
|
||||
expect(process.env.OPENCLAW_STATE_DIR).toBe(`${tempHome.home}/.openclaw`);
|
||||
expect(process.env.OPENCLAW_STATE_DIR).toBe(path.join(tempHome.home, ".openclaw"));
|
||||
await expect(fs.stat(tempHome.home)).resolves.toMatchObject({
|
||||
isDirectory: expect.any(Function),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user