Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chai-http always return undefined #269

Open
dudvil1 opened this issue Apr 7, 2020 · 0 comments
Open

chai-http always return undefined #269

dudvil1 opened this issue Apr 7, 2020 · 0 comments

Comments

@dudvil1
Copy link

dudvil1 commented Apr 7, 2020

need help please!!
i'm try to run this test but the res is always undifined , its weird because when i try it from postman its work fine

the test:

const { chai, assert, should, expect, sinon } = require("../baseTest");

 describe.only("Test the Default routes", function() {
  const server = 'http://localhost:3000';
  this.timeout(20000); 
  it("test the / route", (done) => {
     chai
      .request(server) 
       .get("/") 
       .end(function (err, res) {
         console.log(res);
         expect(err).to.be.null; 
        expect(res).to.have.status(200); 
        done();
      }); 
   }); 
}); 

what im doing wrong

@dudvil1 dudvil1 changed the title chai-http always return undifined chai-http always return undefined Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant