We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0408dc commit cca4feaCopy full SHA for cca4fea
README.md
@@ -271,7 +271,7 @@ const FastifyWebSocket = require('@fastify/websocket')
271
const ws = require('ws')
272
273
const fastify = Fastify()
274
-await fastify.register(websocket)
+await fastify.register(FastifyWebSocket)
275
276
fastify.get('/', { websocket: true }, (socket, req) => {
277
const stream = ws.createWebSocketStream(socket, { /* options */ })
@@ -332,6 +332,7 @@ test('connect to /', async (t) => {
332
333
fastify.register(App)
334
t.teardown(fastify.close.bind(fastify))
335
+ await fastify.ready()
336
337
const ws = await fastify.injectWS('/', {headers: { "api-key" : "some-random-key" }})
338
let resolve;
0 commit comments