Cover null runtime auth token startup rejection
Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
1 parent
6b20a47021
commit
b520aa63f4
1 file changed
+10
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user