Cover NaN and infinite bootstrap timeout rejection

Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
Cursor AgentandTheo Browne committed 2026-02-10 03:25:21 +00:00
1 parent 79de5bf9a2
commit e1f6c86c75
1 file changed
+20
+20
View File
@@ -268,6 +268,26 @@ describe("runtimeApiServer", () => {
).rejects.toThrow("Invalid bootstrapSessionTimeoutMs");
});
it("rejects NaN bootstrap timeout configuration", async () => {
await expect(
startRuntimeApiServer({
port: 0,
launchCwd: process.cwd(),
bootstrapSessionTimeoutMs: Number.NaN,
}),
).rejects.toThrow("Invalid bootstrapSessionTimeoutMs");
});
it("rejects infinite bootstrap timeout configuration", async () => {
await expect(
startRuntimeApiServer({
port: 0,
launchCwd: process.cwd(),
bootstrapSessionTimeoutMs: Number.POSITIVE_INFINITY,
}),
).rejects.toThrow("Invalid bootstrapSessionTimeoutMs");
});
it("rejects overly large bootstrap timeout configuration", async () => {
await expect(
startRuntimeApiServer({