I am currently using chakram to test an api that takes some time. I am finding that even though I can verify I get a response in under the time the timeout is thrown, mocha is still timing out before exiting the test.
Here is my test:
it('POST valid username should return a valid user object', function(done) {
this.timeout(10000);
return chakram.post(register_uri, new_user)
.then(response => {
expect(response).to.have.status(200);
expect(response).to.comprise.of.json(new_user);
done();
});
})
Is this the correct way to extend the timeout? Anything I am doing wrong?
I am currently using chakram to test an api that takes some time. I am finding that even though I can verify I get a response in under the time the timeout is thrown, mocha is still timing out before exiting the test.
Here is my test:
Is this the correct way to extend the timeout? Anything I am doing wrong?