diff --git a/src/auto-reply/reply.block-streaming.test.ts b/src/auto-reply/reply.block-streaming.test.ts index 0a5cb7423..cbd41c5e0 100644 --- a/src/auto-reply/reply.block-streaming.test.ts +++ b/src/auto-reply/reply.block-streaming.test.ts @@ -83,15 +83,23 @@ describe("block streaming", () => { }); afterAll(async () => { - await fs.rm(fixtureRoot, { - recursive: true, - force: true, - maxRetries: 10, - retryDelay: 50, - }); + if (process.platform === "win32") { + await fs.rm(fixtureRoot, { + recursive: true, + force: true, + maxRetries: 10, + retryDelay: 50, + }); + } else { + await fs.rm(fixtureRoot, { + recursive: true, + force: true, + }); + } }); beforeEach(() => { + vi.stubEnv("OPENCLAW_TEST_FAST", "1"); piEmbeddedMock.abortEmbeddedPiRun.mockReset().mockReturnValue(false); piEmbeddedMock.queueEmbeddedPiMessage.mockReset().mockReturnValue(false); piEmbeddedMock.isEmbeddedPiRunActive.mockReset().mockReturnValue(false); diff --git a/src/auto-reply/reply.heartbeat-typing.test.ts b/src/auto-reply/reply.heartbeat-typing.test.ts index 3b374ec48..52214e4d3 100644 --- a/src/auto-reply/reply.heartbeat-typing.test.ts +++ b/src/auto-reply/reply.heartbeat-typing.test.ts @@ -1,5 +1,5 @@ import { join } from "node:path"; -import { afterEach, describe, expect, it, vi } from "vitest"; +import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import { withTempHome as withTempHomeBase } from "../../test/helpers/temp-home.js"; const runEmbeddedPiAgentMock = vi.fn(); @@ -71,6 +71,10 @@ afterEach(() => { }); describe("getReplyFromConfig typing (heartbeat)", () => { + beforeEach(() => { + vi.stubEnv("OPENCLAW_TEST_FAST", "1"); + }); + it("starts typing for normal runs", async () => { await withTempHome(async (home) => { runEmbeddedPiAgentMock.mockResolvedValueOnce({ diff --git a/src/auto-reply/reply.raw-body.test.ts b/src/auto-reply/reply.raw-body.test.ts index 1d5fe51b5..1804b204d 100644 --- a/src/auto-reply/reply.raw-body.test.ts +++ b/src/auto-reply/reply.raw-body.test.ts @@ -102,6 +102,7 @@ describe("RawBody directive parsing", () => { }); beforeEach(() => { + vi.stubEnv("OPENCLAW_TEST_FAST", "1"); agentMocks.runEmbeddedPiAgent.mockReset(); agentMocks.loadModelCatalog.mockReset(); agentMocks.loadModelCatalog.mockResolvedValue([ diff --git a/src/cron/isolated-agent.delivers-response-has-heartbeat-ok-but-includes.test.ts b/src/cron/isolated-agent.delivers-response-has-heartbeat-ok-but-includes.test.ts index 92d191687..e3d915cde 100644 --- a/src/cron/isolated-agent.delivers-response-has-heartbeat-ok-but-includes.test.ts +++ b/src/cron/isolated-agent.delivers-response-has-heartbeat-ok-but-includes.test.ts @@ -102,6 +102,7 @@ describe("runCronIsolatedAgentTurn", () => { }); beforeEach(() => { + vi.stubEnv("OPENCLAW_TEST_FAST", "1"); vi.mocked(runEmbeddedPiAgent).mockReset(); vi.mocked(loadModelCatalog).mockResolvedValue([]); vi.mocked(runSubagentAnnounceFlow).mockReset().mockResolvedValue(true);