flatiron/nock — Issue #39: Is there a way to skip asserting the request body?
Author: jesusabdullah
Created: 2012-02-24 05:11:43+00:00
State: open

I was working on the new jitsu tests (nock is fabulous for this btw), and I came across an interesting situation when trying to mock snapshot uploads here:

https://github.com/nodejitsu/jitsu/blob/flatiron-apps-tests/test/commands/apps-test.js#L99

What happens here is that jitsu tries to post a snapshot using content-type chunked, and for the life of me I can't figure out how to specify a request body in such a way that nock is cool with it.

You can see some of the errors I was getting here:

https://gist.github.com/39d0e24897c8d339722a

The easiest thing for me would be to tell nock to accept *any* request body, but if I can figure out how to make it handle a chunked body (copy-pasting the string-encoded .tgz didn't help) I'd be happy with that as well.

Any ideas?