Cover null runtime auth token startup rejection

Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
Cursor AgentandTheo Browne committed 2026-02-10 04:35:06 +00:00
1 parent 6b20a47021
commit b520aa63f4
1 file changed
+10
+10
View File
@@ -403,6 +403,16 @@ describe("runtimeApiServer", () => {
).rejects.toThrow("Invalid runtime auth token");
});
it("rejects null auth token configuration", async () => {
await expect(
startRuntimeApiServer({
port: 0,
launchCwd: process.cwd(),
authToken: null as unknown as string,
}),
).rejects.toThrow("Invalid runtime auth token");
});
it("accepts websocket connections without token when auth is disabled", async () => {
const server = await startRuntimeApiServer({
port: 0,