eugef / node-mocks-http

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

add missing property 'cookies' to MockResponse type #160

Closed elmarx closed 6 years ago

elmarx commented 6 years ago

Hi,

The MockResponse-type-definition lacks the "cookies" property. For value and options I re-used the same typings used for express' cookie() function arguments.

I don't understand your pattern when to use "interface" and when to use "type", so I chose "type" do define ResponseCookies, as I personally prefer "type" do describe shapes for ordinary JS objects/dicts.

If you don't like the definition as type-alias, just let me know, and I'll switch it to an interface.

eugef commented 6 years ago

@zauberpony thanks for your PR