From 04ac41d91191f5d6ebaed45a9bb6cb267a54dbb8 Mon Sep 17 00:00:00 2001 From: Sheel Choksi Date: Sun, 21 Jul 2013 15:32:34 -0700 Subject: [PATCH] Fix phantomjs by using fnNameFor Phantomjs's execptions toString include a ': ' at the end, so instead use the exception's name property --- src/core/matchers/toThrowError.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/matchers/toThrowError.js b/src/core/matchers/toThrowError.js index 9c24c87b..ca5a7df0 100644 --- a/src/core/matchers/toThrowError.js +++ b/src/core/matchers/toThrowError.js @@ -32,7 +32,7 @@ getJasmineRequireObj().toThrowError = function(j$) { } if (arguments.length == 1) { - return pass("Expected function not to throw an Error, but it threw " + thrown + "."); + return pass("Expected function not to throw an Error, but it threw " + fnNameFor(thrown) + "."); } if (errorType) {