☕️ Classic, reliable, trusted test framework for Node.js and the browser
Release 1.4.2
TJ Holowaychuk8eaed5e9344c
diff --git a/History.md b/History.mdindex 04a22727..1eb056b9 100644--- a/History.md+++ b/History.md@@ -1,4 +1,16 @@+1.4.2 / 2012-09-01+==================++ * add support to multiple `Mocha#globals()` calls, and strings+ * add `mocha.reporter()` constructor support [joliss]+ * add `mocha.timeout()`+ * move query-string parser to utils.js+ * move highlight code to utils.js+ * fix third-party reporter support [exogen]+ * fix client-side API to match node-side [jfirebaugh]+ * fix mocha in iframe [joliss]+1.4.1 / 2012-08-28==================diff --git a/mocha.js b/mocha.jsindex 7a5ce919..1b148a1a 100644--- a/mocha.js+++ b/mocha.js@@ -1026,7 +1026,11 @@ Mocha.prototype.reporter = function(reporter){this._reporter = reporter;} else {reporter = reporter || 'dot';- this._reporter = require('./reporters/' + reporter);+ try {+ this._reporter = require('./reporters/' + reporter);+ } catch (err) {+ this._reporter = require(reporter);+ }if (!this._reporter) throw new Error('invalid reporter "' + reporter + '"');}return this;diff --git a/package.json b/package.jsonindex 23146944..3b460837 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "mocha"- , "version": "1.4.1"+ , "version": "1.4.2", "description": "simple, flexible, fun test framework", "keywords": ["test", "bdd", "tdd", "tap"], "author": "TJ Holowaychuk <[email protected]>"