fix: ensure websockets are correctly passed (#65759)
Further enhancing the typings across the codebase, this resolves some errors discovered while running tests. During development, previously, if the websocket request was forwarded down to the route resolver, it would fail. This is because a `Duplex` stream is not a `ServerResponse`. I opted to use the `MockedResponse` here to ensure the remaining code didn't change, as we're only using the resolve routes code to identify a match rather than actually sending the response on. The response data is sent later with the `proxyRequest` which here does have support for `Duplex` streams.
Showing
Please
register
or
sign in
to comment