diff --git a/package.json b/package.json index 4ff5cfebb..fb946c582 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "test:load:50": "LOG_LEVEL=info vitest run --project=load --testNamePattern='Load Test: 50 Concurrent Clients'", "test:load:100": "LOG_LEVEL=info vitest run --project=load --testNamePattern='Load Test: 100 Concurrent Clients'", "test:load:200": "LOG_LEVEL=info vitest run --project=load --testNamePattern='Load Test: 200 Concurrent Clients'", - "lint": "eslint . --ext .ts,.tsx", + "lint": "eslint . --ext .ts,.tsx --max-warnings=0", "prepare": "husky" }, "dependencies": { diff --git a/tests/client/tutor.test.tsx b/tests/client/tutor.test.tsx index 559e6b520..8fa445d08 100644 --- a/tests/client/tutor.test.tsx +++ b/tests/client/tutor.test.tsx @@ -163,9 +163,8 @@ describe("useTutor", () => { it("resets a pinned dialog when the active Course Content revision changes", async () => { setActiveExternalExampleContext({ repository: "owner/repo", ref: "main", revision: "a".repeat(40), exampleId: "arrays" }); - const fetchMock = vi.spyOn(globalThis, "fetch").mockImplementation(async (input, init) => { + const fetchMock = vi.spyOn(globalThis, "fetch").mockImplementation(async (input) => { if (String(input) === "/api/config") return new Response(JSON.stringify({ tutor: { provider: "kiconnect" } }), { status: 200 }); - const body = JSON.parse(String(init?.body ?? "{}")) as Record; if (String(input) === "/api/tutor/question") { return new Response(JSON.stringify({ question: "Frage", diff --git a/tests/integration/concurrent-50-clients.test.ts b/tests/integration/concurrent-50-clients.test.ts index f78d0504c..8c2cf10ca 100644 --- a/tests/integration/concurrent-50-clients.test.ts +++ b/tests/integration/concurrent-50-clients.test.ts @@ -194,7 +194,7 @@ vi.mock("../../server/services/registry-manager", () => ({ vi.mock("../../server/services/compiler-with-fallback", () => { class MockCompilerWithFallback { - async compile(code: string) { + async compile() { return { success: true, firmware: "deadbeef", errors: [], parsed: [] }; } async shutdown() { diff --git a/tests/server/load-suite.test.ts b/tests/server/load-suite.test.ts index 1a5a74e4a..e73f21708 100644 --- a/tests/server/load-suite.test.ts +++ b/tests/server/load-suite.test.ts @@ -447,7 +447,6 @@ function createLoadTestSuite( const outputDir = process.env.LOAD_TEST_OUTPUT_DIR; if (outputDir) { try { - const { saveTestMetrics } = await import('./load-suite.test'); // saveTestMetrics(testResults, outputDir, numClients); console.log(`[LoadTest] Would save metrics to ${outputDir} (disabled to avoid circular dependency)`); } catch (err) { diff --git a/tests/server/routes/shutdown-websocket.test.ts b/tests/server/routes/shutdown-websocket.test.ts index 0b3187b96..58d9a7079 100644 --- a/tests/server/routes/shutdown-websocket.test.ts +++ b/tests/server/routes/shutdown-websocket.test.ts @@ -1,5 +1,5 @@ import express from "express"; -import { createServer, type Server } from "node:http"; +import type { Server } from "node:http"; import type { AddressInfo } from "node:net"; import { afterEach, describe, expect, it, vi } from "vitest"; import { WebSocket } from "ws"; diff --git a/tests/server/services/sandbox/cleanup-phase.test.ts b/tests/server/services/sandbox/cleanup-phase.test.ts index 9fab10e06..9e2981709 100644 --- a/tests/server/services/sandbox/cleanup-phase.test.ts +++ b/tests/server/services/sandbox/cleanup-phase.test.ts @@ -9,11 +9,9 @@ * - Error-Pfade und No-op-Pfade */ -import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; +import { describe, it, expect, vi } from "vitest"; import { flushMessageQueue, flushBatchers, cleanupDockerContainer } from "../../../../server/services/sandbox/execution-phases/cleanup-phase"; import type { ExecutionState } from "../../../../server/services/sandbox/execution-manager"; -import type { PinStateBatcher } from "../../pin-state-batcher"; -import type { SerialOutputBatcher } from "../../serial-output-batcher"; // Mocks für Dependencies const createMockLogger = () => ({ diff --git a/tests/server/services/scalability-stress.test.ts b/tests/server/services/scalability-stress.test.ts index 4eca9f616..61fd025a2 100644 --- a/tests/server/services/scalability-stress.test.ts +++ b/tests/server/services/scalability-stress.test.ts @@ -456,7 +456,7 @@ describe("Scalability stress: SandboxStartSemaphore", () => { let peakActive = 0; const queuings: number[] = []; - const promises = Array.from({ length: 10 }, (_, i) => + const promises = Array.from({ length: 10 }, () => (async () => { const start = Date.now(); const release = await semaphore.acquire(() => { diff --git a/tests/server/services/server-metrics.test.ts b/tests/server/services/server-metrics.test.ts index 1e0878d23..1f39cf3d4 100644 --- a/tests/server/services/server-metrics.test.ts +++ b/tests/server/services/server-metrics.test.ts @@ -54,7 +54,7 @@ describe("Server Metrics (Phase 3.9 Observability)", () => { it("should calculate CPU percentage from two samples", () => { // First call initializes baseline - const metrics1 = getProcessMetrics(); + getProcessMetrics(); // Second call should have CPU data const metrics2 = getProcessMetrics();