Is there convenient way to mock the HTTP Request and Response objects for unit testing middlewares?
It looks like both https://github.com/howardabrams/node-mocks-http and https://github.com/vojtajina/node-mocks can be used to create mock http.ServerRequest and http.ServerResponse objects.
http.ServerRequest
http.ServerResponse
1.4m articles
1.4m replys
5 comments
57.0k users