I am trying to find out a way to test an upload functionality in my app using the assert response.
I keep getting the socket hangup, might be because of some wrong headers i am setting.
Is there a sample, which i could use it as a reference.
Expresso doesn't support the continue event on a request, so I had to modify it to work with it. Please take a look at mmmmmm2/expresso@3f13a95 for my quick patch.
Then in the assert.response you need to set a header like this 'Expect': '100-continue'
If you are doing a multipart/form-data upload, then you will also need to manually get the Content-Type and Content-Length headers added as well. And then make sure the body of the request conforms with the way multipart/form-data uploads are expected... just google around for that if you need to.
when I have time im going to adapt superagent for testing frameworks, it'll be much more flexible