npm / npm-registry-client

http://npm.im/npm-registry-client
ISC License
264 stars 108 forks source link

add data and response into request #149

Closed watilde closed 7 years ago

watilde commented 7 years ago

from https://github.com/npm/npm/issues/15306. To get a statusCode in npm/lib/ping.js, we need to pass them even error exists.

watilde commented 7 years ago

@zkat Hello! I just added a test for it now :)

zkat commented 7 years ago

@watilde thanks! Could you make sure data and response are part of the tests, too? This was helpful, thank you ❤️

watilde commented 7 years ago

Ah you're right, that should be checked in tests :)

I've added the following two lines for it!

+    t.same(data, JSON.stringify(wanted))
+    t.same(res.body.toString(), JSON.stringify(wanted))
zkat commented 7 years ago

Released as npm-registry-client@7.5.0

watilde commented 7 years ago

Great! Arigato<3

zkat commented 7 years ago

いいえいいえ。こちらこそ、ワチくん。^___^