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

Commit 9b632df

Browse files
author
Fotios Lindiakos
committed
Properly use done CB in tests for async to prevent waiting for timeout
1 parent 96b67d8 commit 9b632df

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: test/helpers.js

+3
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ var prepareText = module.exports.prepareText = function (text) {
111111
module.exports.expectContent = function (content, done) {
112112
return function (err, res) {
113113
if (err) {
114+
if (_.isFunction(done)) {
115+
return done(err);
116+
}
114117
throw err;
115118
}
116119

0 commit comments

Comments
 (0)