You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want node-mocks-http to provide Express 4.x compatible request and response object mocks. As with 1.x we want 2.x to be as lightweight and dependency free as possible.
The list below is a first draft of our roadmap towards 2.0. It is by no means comprehensive or final. Comments, questions and requests are most definitely welcome.
Proposed Changes
add mockStream (with sufficient functionality for mockStreamReadable), which will inherit from EventEmitter used real Stream
deprecate mockEventEmitter in favor using a real EventEmitter
add mockStreamReadable (with sufficient functionality for mockHttpIncomingMessage), which will inherit from mockStream used real Stream.Readable
update mockStreamWritable (with sufficient functionality for mockHttpOutgoingMessage), which will inherit from mockStream used real Stream.Writable
add mockHttpIncomingMessagenode/_http_incoming.js (to mock http.IncomingMessage), which will inherit from mockStreamReadable
add mockHttpOutgoingMessage (to mock http.OutgoingMessage), which will inherit from mockWritableReadable
add mockApp, which will serve as a parent to mockRequest and mockResponse, and will perform some initialization task, so as associating mockRequest with mockResponse (and vice versa). It will likewise provide the ability to configure Express-related settings that have an effect on request and response
deprecate .createRequest() and .createResponse() methods in favor of a .createApp(), which will return an mockApp instance that includes both a mockRequest and a mockResponse instance.
NOTE: The intent of the above mocks is to support (via inheritance) mockRequest and mockResponse. These will contain only a subset of their "real life" counterparts. They will be used internally by node-mocks-http and will not be exported for consumption.
We will consider expanding them to full-blown mocks that can be made available for public consumption in future versions of node-mocks-http.
update mockRequest to inherit from mockHttpIncomingMessage
update mockResponse to inherit form mockHttpServerResponse
add warning for all deprecated Express functionality (maybe using deprecatedepd as Express does)
Pending Issues
The proposed changes for 2.0 will either response or provide a means to resolve all pending issues.
If you're a node-mocks-http user/consumer we would love to hear your thoughts regarding our 2.0 Roadmap. Please leave your comments below.
For those of you who wish to contribute, we will be creating 2.x branch during the first week of April against which you can submit your pull requests. we've merged our progress of 2.x onto master. Submit any pull request for 2.x against master. Please read and follow our contributing guidelines prior to your submission.
The text was updated successfully, but these errors were encountered:
Roadmap to node-mocks-http v2.0
We want
node-mocks-http
to provide Express4.x
compatiblerequest
andresponse
object mocks. As with1.x
we want2.x
to be as lightweight and dependency free as possible.The list below is a first draft of our roadmap towards
2.0
. It is by no means comprehensive or final. Comments, questions and requests are most definitely welcome.Proposed Changes
addused realmockStream
(with sufficient functionality formockStreamReadable
), which will inherit fromEventEmitter
Stream
mockEventEmitter
in favor using a realEventEmitter
addused realmockStreamReadable
(with sufficient functionality formockHttpIncomingMessage
), which will inherit frommockStream
Stream.Readable
updateused realmockStreamWritable
(with sufficient functionality formockHttpOutgoingMessage
), which will inherit frommockStream
Stream.Writable
mockHttpIncomingMessage
node/_http_incoming.js
(to mockhttp.IncomingMessage
), which will inherit frommockStreamReadable
mockHttpOutgoingMessage
(to mockhttp.OutgoingMessage
), which will inherit frommockWritableReadable
mockHttpServerResponse
(to mockhttp.ServerResponse
)mockApp
, which will serve as a parent tomockRequest
andmockResponse
, and will perform some initialization task, so as associatingmockRequest
withmockResponse
(and vice versa). It will likewise provide the ability to configure Express-related settings that have an effect onrequest
andresponse
.createRequest()
and.createResponse()
methods in favor of a.createApp()
, which will return anmockApp
instance that includes both amockRequest
and amockResponse
instance.mockRequest
to inherit frommockHttpIncomingMessage
mockResponse
to inherit formmockHttpServerResponse
deprecatedepd as Express does)Pending Issues
The proposed changes for
2.0
will either response or provide a means to resolve all pending issues.Comments and Contributions
If you're a
node-mocks-http
user/consumer we would love to hear your thoughts regarding our 2.0 Roadmap. Please leave your comments below.For those of you who wish to contribute,
we will be creatingwe've merged our progress of2.x
branch during the first week of April against which you can submit your pull requests.2.x
ontomaster
. Submit any pull request for2.x
againstmaster
. Please read and follow our contributing guidelines prior to your submission.The text was updated successfully, but these errors were encountered: