Assert tokenized ws URL in runtime auth test
Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
1 parent
0b9fbd7a7c
commit
ba30900df9
1 file changed
+1
@@ -169,6 +169,7 @@ describe("runtimeApiServer", () => {
|
||||
servers.push(server);
|
||||
|
||||
const authorizedUrl = new URL(server.wsUrl);
|
||||
expect(authorizedUrl.searchParams.get("token")).toBe("secret-token");
|
||||
const unauthorizedUrl = `${authorizedUrl.origin}${authorizedUrl.pathname}`;
|
||||
const unauthorizedClient = new WebSocket(unauthorizedUrl);
|
||||
const unauthorizedClose = await withTimeout(
|
||||
|
||||
Reference in new issue
Block a user