Skip to content

Commit cc147c6

Browse files
committed
test(discord): align websocket mock constructor type
1 parent c55b52d commit cc147c6

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

extensions/discord/src/monitor/provider.proxy.test.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,9 @@ describe("createDiscordGatewayPlugin", () => {
239239
options?: { agent?: unknown; handshakeTimeout?: number },
240240
) {
241241
webSocketSpy(url, options);
242-
} as unknown as new (
243-
url: string,
244-
options?: { agent?: unknown; handshakeTimeout?: number },
245-
) => import("ws").WebSocket,
242+
} as unknown as NonNullable<
243+
Parameters<typeof createDiscordGatewayPlugin>[0]["testing"]
244+
>["webSocketCtor"],
246245
registerClient: async (_plugin: unknown, client: unknown) => {
247246
baseRegisterClientSpy(client);
248247
},

0 commit comments

Comments
 (0)