Cover NaN and infinite bootstrap timeout rejection
Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
1 parent
79de5bf9a2
commit
e1f6c86c75
1 file changed
+20
@@ -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({
|
||||
|
||||
Reference in new issue
Block a user