mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
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.
This commit is contained in:
@@ -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([
|
||||
|
||||
Reference in New Issue
Block a user