diff --git a/lib/assertions/is-function.js b/lib/assertions/is-function.js index 0d613e2d..fe3a82a9 100644 --- a/lib/assertions/is-function.js +++ b/lib/assertions/is-function.js @@ -11,7 +11,9 @@ module.exports = function(referee) { expectation: "toBeFunction", values: function(actual, message) { return { - actual: String(actual).replace("\n", ""), + actual: String(actual) + .replace("function(", "function (") + .replace("\n", ""), actualType: typeof actual, customMessage: message };