title: Make only 1 http call for chai-http unit-testing in Node?
body: <p>I'm trying out the <a href="http://chaijs.com/plugins/chai-http" rel="nofollow">chai-http</a> plugin for Mocha/Chai.  Which wraps around Superagent.  Everything seems to work well, except I'm wondering...</p>
  
  <p>Shouldn't I be able to make the http call once and write separate tests for each?  The tests seem to expect you to write your assertion inside the response function like so:</p>
  
  <pre><code>describe "github test", -&gt;
  
     it "should connect with a 200 status", -&gt;
       chai.request(githubReqObj.base)
        .get(githubReqObj.url)
        .req (req) -&gt;
           req.set
             'Accept': 'application/vnd.github.beta+json'
           return
        .res (res) -&gt;
           expect(res).to.have.status 200
  </code></pre>
  
  <p>But I want to run several assertions, and have each of them under their own "it" block.</p>
  
  <p>Is there a way to run</p>
  
  <pre><code>   before -&gt;
  </code></pre>
  
  <p>And then just call my assertions on the value of response?</p>