Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

Commit

Permalink
Properly use done CB in tests for async to prevent waiting for timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
Fotios Lindiakos committed Aug 25, 2016
1 parent 66e923c commit 1e86b1f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ var prepareText = module.exports.prepareText = function (text) {
module.exports.expectContent = function (content, done) {
return function (err, res) {
if (err) {
if (_.isFunction(done)) {
return done(err);
}
throw err;
}

Expand Down

0 comments on commit 1e86b1f

Please sign in to comment.