Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

style

TJ Holowaychukbebbec637d81
diff --git a/lib/runner.js b/lib/runner.js
index 9354d2e9..91206a02 100644
--- a/lib/runner.js
+++ b/lib/runner.js
@@ -181,7 +181,7 @@ Runner.prototype.checkGlobals = function(test){
Runner.prototype.fail = function(test, err){
++this.failures;
test.state = 'failed';
- if ('string' == typeof err && ! err.uncaught) {
+ if ('string' == typeof err && !err.uncaught) {
err = new Error('the string "' + err + '" was thrown, throw an Error :)');
}
@@ -488,7 +488,7 @@ Runner.prototype.run = function(fn){
// uncaught callback
function uncaught(err, url, line) {
- self.uncaught(new Error(err + '(' + url + ':' + line + ')'));
+ self.uncaught(new Error(err + ' (' + url + ':' + line + ')'));
}
// callback