Skip to content

Commit

Permalink
refactor: fastify websocket socket ctor name is WebSocket
Browse files Browse the repository at this point in the history
  • Loading branch information
enisdenjo committed Mar 6, 2023
1 parent 5ac7467 commit 7e3f1a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/__tests__/use.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ for (const { tServer, skipUWS, startTServer } of tServers) {
stream.Duplex,
);
expect(
(ctx.extra as FastifyExtra).connection.socket,
).toBeInstanceOf(ws);
(ctx.extra as FastifyExtra).connection.socket.constructor.name,
).toBe('WebSocket');
expect((ctx.extra as FastifyExtra).request.constructor.name).toBe(
'_Request',
);
Expand Down

0 comments on commit 7e3f1a7

Please sign in to comment.