eugef / node-mocks-http

Mock 'http' objects for testing Express routing functions
Other
753 stars 133 forks source link

mockResponse.writeHead do not return instance as ServerResponse.writeHead do #201

Closed leosuncin closed 4 years ago

leosuncin commented 4 years ago

The current implementation do not return the Response instance as ServerResponse.writeHead do.

See the official documentation as reference, it says that the function returns 1 ServerResponse instance.

Environment

program/package version
node 13.3.0
node-mocks-http 1.8.1

Source code with the issue https://codesandbox.io/s/node-mocks-http-issue-febs0

Notes 1: Since node.js version 11.10.0

github-actions[bot] commented 4 years ago

Stale issue message

leosuncin commented 4 years ago

Keep open. Tests must resemble the behavior of production environment, so the mock should be as close as possible and copycat the Node.js libraries

El mié., 26 de feb. de 2020 18:08, github-actions[bot] < notifications@github.com> escribió:

Stale issue message

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/howardabrams/node-mocks-http/issues/201?email_source=notifications&email_token=ABA3V4OGY7UBO5WDKVRXHX3RE376VA5CNFSM4KAIJ7OKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENCMC3I#issuecomment-591708525, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABA3V4O5WULNA34HO7A2HY3RE376VANCNFSM4KAIJ7OA .