
Nock – HTTP mocking and expectations library - tilt
https://github.com/pgte/nock
======
cmkrnl
I'd like to lodge a modest complaint about the name.
[http://doc.urbit.org/doc/nock/tut/1/](http://doc.urbit.org/doc/nock/tut/1/)

~~~
davidgerard
I'm sure there's lots of namespace room! And if there isn't, then too bad for
Urbit.

~~~
state
Or too bad for pgte

------
mmcclure
I used this for a few projects a while back and loved it, and looking through
the README in Master it seems like a _lot_ has been improved:

\- Delayed responses. \- Delayed connections. \- Custom HTTP verbs for ones
that don't have convenience methods. \- Nock Back

I believe recording had just been introduced when I was using the library, but
Nock Back is seems like the last piece that brings it on par with the VCR lib
I was used to using with Ruby / RSpec projects.

It's always nice to scroll through a project you've had a good experience with
and see the README has been considerably fleshed out (in a good way).

------
nailer
A lot of my current projects have Test Induced Design Damage from having HTTP
functionality ripped away from any other processing. This would make my
methods shorter and my tests cover more as well.

------
t__crayford
I've used this library a bunch with decent success. Most recently on an API
client for my current product:
[https://github.com/yeller/yeller_node](https://github.com/yeller/yeller_node)
(see
[https://github.com/yeller/yeller_node/blob/master/spec/integ...](https://github.com/yeller/yeller_node/blob/master/spec/integration/yeller_node_spec.js)
for the tests in question). Very happy with it so far!

------
vvoyer
If you are looking for a browser solution (ajax mocking):
[https://github.com/algolia/faux-jax](https://github.com/algolia/faux-jax)

------
deitcher
I have used this in the past with success. It does its job.

------
general_failure
nock is great and we use it for testing with great success.

Also a shout out for hock which gives the same API as mock but useful for
mocking external services -
[https://github.com/mmalecki/hock](https://github.com/mmalecki/hock).

------
codemod
nock is good.. used it a few times..

