diff --git a/lib/Unexpected.js b/lib/Unexpected.js index 962749a07..71fa6809e 100644 --- a/lib/Unexpected.js +++ b/lib/Unexpected.js @@ -917,7 +917,7 @@ Unexpected.prototype.lookupAssertionRule = function (subject, testDescriptionStr } var handlers = this.assertions[testDescriptionString]; if (!handlers) { - return; + return null; } var cachedTypes = {}; @@ -986,6 +986,8 @@ Unexpected.prototype.lookupAssertionRule = function (subject, testDescriptionStr return handler; } } + + return null; }; function makeExpectFunction(unexpected) {