test: trim import-heavy startup paths

This commit is contained in:
Peter Steinberger
2026-03-22 00:52:03 +00:00
parent 8b7f40580d
commit d0d82ea67b
9 changed files with 367 additions and 268 deletions

View File

@@ -4,7 +4,6 @@ import path from "node:path";
import { afterAll, beforeAll, describe, expect, it, vi } from "vitest";
import type { OpenClawConfig } from "../../../config/config.js";
import { writeWorkspaceFile } from "../../../test-helpers/workspace.js";
import type { HookHandler } from "../../hooks.js";
import { createHookEvent } from "../../hooks.js";
// Avoid calling the embedded Pi agent (global command lane); keep this unit test deterministic.
@@ -12,7 +11,7 @@ vi.mock("../../llm-slug-generator.js", () => ({
generateSlugViaLLM: vi.fn().mockResolvedValue("simple-math"),
}));
let handler: HookHandler;
let handler: typeof import("./handler.js").default;
let suiteWorkspaceRoot = "";
let workspaceCaseCounter = 0;