Skip to content

Commit 8ca888b

Browse files
committed
fix: better exit process in running app test
1 parent 3a08d54 commit 8ca888b

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

scripts/__tests__/create-handbook.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ describe("create-handbook CLI", () => {
9393
stdio: "pipe",
9494
});
9595

96-
// Wait for server to be ready with retry mechanism
96+
// Wait for server to be ready with retries
9797
let serverReady = false;
9898
let attempts = 0;
9999
const maxAttempts = 30; // 30 seconds total
@@ -108,10 +108,9 @@ describe("create-handbook CLI", () => {
108108

109109
// Send Ctrl+C (SIGINT) to the process and wait for it to exit
110110
startProcess.kill("SIGINT");
111-
await new Promise((resolve) => startProcess.on("exit", resolve));
112111
} finally {
113112
// Clean up
114113
await fs.rm(targetDir, { recursive: true, force: true });
115114
}
116-
}, 120000); // 120 second timeout for this test, since we need to Build, Start, and Stop the server
115+
}, 60000); // 60 second timeout for this test, since we need to Build, Start, and Stop the server
117116
});

0 commit comments

Comments
 (0)