fix(server): increase hookTimeout and fix ClaudeAgentClient constructor

- Increase vitest hookTimeout from 30s to 60s to prevent hook timeouts
  in e2e tests that need time to start daemon instances
- Add `**/dist/**` to excludes to avoid running compiled test files
- Fix ClaudeAgentClient constructor call in claude-agent-commands.test.ts
  to pass required logger option
This commit is contained in:
Mohamed Boudra
2026-01-17 13:09:42 +07:00
parent 1c9d9367c1
commit 45096acdcb
2 changed files with 4 additions and 3 deletions

View File

@@ -12,6 +12,7 @@
import { describe, it, expect, beforeAll, afterAll } from "vitest";
import { ClaudeAgentClient } from "./claude-agent.js";
import type { AgentSession, AgentSessionConfig, AgentSlashCommand } from "../agent-sdk-types.js";
import { createTestLogger } from "../../../test-utils/test-logger.js";
describe("ClaudeAgentSession Commands", () => {
let client: ClaudeAgentClient;
@@ -28,7 +29,7 @@ describe("ClaudeAgentSession Commands", () => {
};
beforeAll(async () => {
client = new ClaudeAgentClient();
client = new ClaudeAgentClient({ logger: createTestLogger() });
});
afterAll(async () => {

View File

@@ -9,7 +9,7 @@ export default defineConfig({
},
test: {
testTimeout: 30000,
hookTimeout: 30000,
hookTimeout: 60000,
globals: true,
environment: "node",
setupFiles: [path.resolve(__dirname, "./src/test-utils/vitest-setup.ts")],
@@ -20,6 +20,6 @@ export default defineConfig({
maxForks: 4,
},
},
exclude: ["**/node_modules/**"],
exclude: ["**/node_modules/**", "**/dist/**"],
},
});