Skip to content

Commit

Permalink
Fix test function check. Closes #579
Browse files Browse the repository at this point in the history
  • Loading branch information
hueniverse committed May 6, 2016
1 parent fa81435 commit 78a03fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions lib/runner.js
Expand Up @@ -608,10 +608,7 @@ internals.protect = function (item, state, callback) {

itemResult.then(() => finish(null), (err) => finish(err, 'done'));
}

if (item.fn.length !== 1 &&
!(itemResult && itemResult.then instanceof Function)) {

else if (!item.fn.length) {
finish(new Error(`Function for "${item.title}" should either take a callback argument or return a promise`), 'function signature');
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "lab",
"description": "Test utility",
"version": "10.5.0",
"version": "10.5.1",
"repository": "git://github.com/hapijs/lab",
"main": "lib/index.js",
"keywords": [
Expand Down

0 comments on commit 78a03fd

Please sign in to comment.