You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All assertions inside the HTTP call callbacks need to be wrapped in try-catch blocks that call done(error), because at this time if there is a
res.status.should.equal(200)
inside a callback for a REST api call, the whole test suite will die. If we catch the error and call done(error), only the failed test case will be failed and others will continue.
createProjectsUnit.setup(function(err,res){should.equal(err,null);// this will throw an uncaught Error, effectively crashing the test suite before calling done().done();});
The text was updated successfully, but these errors were encountered:
All assertions inside the HTTP call callbacks need to be wrapped in try-catch blocks that call done(error), because at this time if there is a
res.status.should.equal(200)
inside a callback for a REST api call, the whole test suite will die. If we catch the error and call done(error), only the failed test case will be failed and others will continue.
Example:
OK
NOT OK
The text was updated successfully, but these errors were encountered: