perf(test): skip heavy boot paths in reply suites
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -102,6 +102,7 @@ describe("RawBody directive parsing", () => {
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
vi.stubEnv("OPENCLAW_TEST_FAST", "1");
|
||||
agentMocks.runEmbeddedPiAgent.mockReset();
|
||||
agentMocks.loadModelCatalog.mockReset();
|
||||
agentMocks.loadModelCatalog.mockResolvedValue([
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user