-
-
Notifications
You must be signed in to change notification settings - Fork 49
Closed
Description
Hi,
I'm writing some test for a Fastify plugin that uses some koa handler to manage routes.
The test is failing due this check of koa lib:
if (this.socket.encrypted) return 'https';
https://github.com/koajs/koa/blob/master/lib/request.js#L402
Considered that:
- the final solution would be to implement a native plugin for Fastify
- light my request says "Does not use a socket connection.."
- I can use
listeninstead ofinjectto write my tests
Do you think adding a this.socket = {} to the light-my-request is a bad idea?
How would you cover this use case?
Metadata
Metadata
Assignees
Labels
No labels