Skip to content

Commit

Permalink
lookupAssertionRule: Return null when no assertion is found.
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed Dec 23, 2015
1 parent e55a295 commit 2483881
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Unexpected.js
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ Unexpected.prototype.lookupAssertionRule = function (subject, testDescriptionStr
}
var handlers = this.assertions[testDescriptionString];
if (!handlers) {
return;
return null;
}
var cachedTypes = {};

Expand Down Expand Up @@ -986,6 +986,8 @@ Unexpected.prototype.lookupAssertionRule = function (subject, testDescriptionStr
return handler;
}
}

return null;
};

function makeExpectFunction(unexpected) {
Expand Down

0 comments on commit 2483881

Please sign in to comment.