title: Cannot read property 'status' of undefined - Mocha Chai
body: <p>so im newbie with mocha-chai things in nodejs env.
  i dont understand why i cant get the response status while running mochajs.</p>
  
  <p>here is my code : </p>
  
  <pre><code>let chai = require('chai');
  let chaiHttp = require('chai-http');
  let server = require('server');
  let expect = require("chai").expect;
  let should = require("should");
  
  let request = require("superagent");
  let util = require("util");
  
  chai.use(chaiHttp);
  
  describe('API Clinic Test', function() {
  
    it('should list ALL clinic on /api/v1/clinic GET', function(done) {
    chai.request(server)
      .get('http://localhost:5000/api/v1/clinic')
      .end(function(err, res){
          // res.should.have.status(200);
          expect(res.status).to.equal(200);
        done();
      });
    });
  
    it('should list a SINGLE clinic on /api/v1/clinic/&lt;id&gt; GET');
    it('should add a SINGLE clinic on /api/v1/clinic POST');
    it('should update a SINGLE clinic on /api/v1/clinic/&lt;id&gt; PUT');
    it('should delete a SINGLE clinic on /api/v1/clinic/&lt;id&gt; DELETE');
  });
  </code></pre>
  
  <p>everytime i run mocha test.js, i always get this error msg : </p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot read property 'status' of undefined</p>
  </blockquote>
  
  <p>ohya, i use should method too. 
  i got another error msg like : cannot-read-property-should-of-null</p>
  
  <p>i read on this thread. </p>
  
  <p><a href="https://stackoverflow.com/questions/18102152/should-js-cannot-read-property-should-of-null">Should js Cannot read property &#39;should&#39; of null</a></p>
  
  <p>thats why i want to change and use expect method.</p>
  
  <p>can you guys please help me.</p>
  
  <p>thank you.</p>
  
  <p>::: update :::
  how to fix the issue ?
  instead of using this line of codes :</p>
  
  <pre><code>it('should list ALL clinic on /api/v1/clinic GET', function(done) {
    chai.request(server)
      .get('http://localhost:5000/api/v1/clinic')
      .end(function(err, res){
          // res.should.have.status(200);
          expect(res.status).to.equal(200);
        done();
      });
    });
  </code></pre>
  
  <p>i use this :</p>
  
  <pre><code>it('should list ALL clinic on /api/v1/clinic GET', function(done) {
  chai.request('localhost:5000') .get('/api/v1/clinic') 
  .end(function(err, res){
              // res.should.have.status(200);
              expect(res.status).to.equal(200);
            done();
          });
        });
  </code></pre>