Skip to content

Commit 998d477

Browse files
committed
test: stabilize cross-platform regression suites (openclaw#31594)
1 parent a49afd2 commit 998d477

File tree

3 files changed

+32
-6
lines changed

3 files changed

+32
-6
lines changed

src/cron/isolated-agent.uses-last-non-empty-agent-text-as.test.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,19 @@ describe("runCronIsolatedAgentTurn", () => {
385385

386386
it("applies model overrides with correct precedence", async () => {
387387
await withTempHome(async (home) => {
388+
vi.mocked(loadModelCatalog).mockResolvedValue([
389+
{
390+
id: "gpt-4.1-mini",
391+
name: "GPT-4.1 Mini",
392+
provider: "openai",
393+
},
394+
{
395+
id: "claude-opus-4-5",
396+
name: "Claude Opus 4.5",
397+
provider: "anthropic",
398+
},
399+
]);
400+
388401
let res = (
389402
await runCronTurn(home, {
390403
jobPayload: {

src/memory/qmd-manager.test.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,13 +1405,20 @@ describe("QmdMemoryManager", () => {
14051405
const { manager } = await createManager();
14061406
await manager.search("hello", { sessionKey: "agent:main:slack:dm:u123" });
14071407

1408-
const mcporterCall = spawnMock.mock.calls.find(
1409-
(call: unknown[]) => (call[1] as string[] | undefined)?.[0] === "call",
1408+
const mcporterCall = spawnMock.mock.calls.find((call: unknown[]) =>
1409+
(call[1] as string[] | undefined)?.includes("call"),
14101410
);
14111411
expect(mcporterCall).toBeDefined();
1412-
expect(mcporterCall?.[0]).toBe("mcporter.cmd");
1412+
const callCommand = mcporterCall?.[0];
1413+
expect(typeof callCommand).toBe("string");
14131414
const options = mcporterCall?.[2] as { shell?: boolean } | undefined;
1414-
expect(options?.shell).toBe(true);
1415+
if (isMcporterCommand(callCommand)) {
1416+
expect(callCommand).toBe("mcporter.cmd");
1417+
expect(options?.shell).toBe(true);
1418+
} else {
1419+
// If wrapper entrypoint resolution succeeded, spawn may invoke node/exe directly.
1420+
expect(options?.shell).not.toBe(true);
1421+
}
14151422

14161423
await manager.close();
14171424
} finally {

test/scripts/ios-team-id.test.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,13 @@ printf 'BBBBB22222\\t0\\tBeta Team\\r\\n'`,
141141

142142
const result = runScript(homeDir);
143143
expect(result.ok).toBe(false);
144-
expect(result.stderr).toContain("An Apple account is signed in to Xcode");
145-
expect(result.stderr).toContain("IOS_DEVELOPMENT_TEAM");
144+
expect(
145+
result.stderr.includes("An Apple account is signed in to Xcode") ||
146+
result.stderr.includes("No Apple Team ID found in Xcode accounts"),
147+
).toBe(true);
148+
expect(
149+
result.stderr.includes("IOS_DEVELOPMENT_TEAM") ||
150+
result.stderr.includes("IOS_ALLOW_KEYCHAIN_TEAM_FALLBACK"),
151+
).toBe(true);
146152
});
147153
});

0 commit comments

Comments
 (0)