From d3a94e8cf29c818d3c77d21f96343fc288324c23 Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Fri, 24 Apr 2026 03:25:32 +0700 Subject: [PATCH] chore(lint): parallelize script-health-monitor afterEach and spawns Close all stub TCP servers concurrently and spawn typecheck/api scripts via Promise.all to drop two no-await-in-loop warnings. --- .../src/server/script-health-monitor.test.ts | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/packages/server/src/server/script-health-monitor.test.ts b/packages/server/src/server/script-health-monitor.test.ts index c27c34b20..7ad173e1c 100644 --- a/packages/server/src/server/script-health-monitor.test.ts +++ b/packages/server/src/server/script-health-monitor.test.ts @@ -433,19 +433,21 @@ describe("ScriptHealthMonitor", () => { []; try { - for (const scriptName of ["typecheck", "api"]) { - await spawnWorkspaceScript({ - repoRoot: workspace.repoDir, - workspaceId: workspace.repoDir, - projectSlug: "repo", - branchName: null, - scriptName, - daemonPort: null, - routeStore, - runtimeStore, - terminalManager: createStubTerminalManager(createTerminalCalls) as any, - }); - } + await Promise.all( + ["typecheck", "api"].map((scriptName) => + spawnWorkspaceScript({ + repoRoot: workspace.repoDir, + workspaceId: workspace.repoDir, + projectSlug: "repo", + branchName: null, + scriptName, + daemonPort: null, + routeStore, + runtimeStore, + terminalManager: createStubTerminalManager(createTerminalCalls) as any, + }), + ), + ); expect(createTerminalCalls).toHaveLength(2); expect(routeStore.listRoutes()).toEqual([